4.1. CUDBGAPI_st 结构体参考
公共变量
- CUDBGResult ( *acknowledgeEvent30 )( CUDBGEvent30* event )
- Inform the debugger API that the event has been processed.
- CUDBGResult ( *acknowledgeEvents42 )( )
- Inform the debugger API that synchronous events have been processed.
- CUDBGResult ( *acknowledgeSyncEvents )( )
- Inform the debugger API that synchronous events have been processed.
- CUDBGResult ( *clearAttachState )( )
- Clear attach-specific state prior to detach.
- CUDBGResult ( *disassemble )( uint32_t dev, uint64_t addr, uint32_t* instSize, char* buf, uint32_t sz )
- Disassemble instruction at instruction address.
- CUDBGResult ( *finalize )( )
- Finalize the API and free all memory.
- CUDBGResult ( *generateCoredump )( const char* filename, CUDBGCoredumpGenerationFlags flags )
- Generates a coredump for the current GPU state.
- CUDBGResult ( *getAdjustedCodeAddress )( uint32_t devId, uint64_t address, uint64_t* adjustedAddress, CUDBGAdjAddrAction adjAction )
- The client must call this function before inserting a breakpoint, or when the previous or next code address is needed. Returns the adjusted code address for a given code address for a given device.
- CUDBGResult ( *getBlockDim )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockDim )
- Get the number of threads in the given block.
- CUDBGResult ( *getClusterDim )( uint32_t dev, uint64_t gridId64, CuDim3* clusterDim )
- Get the number of blocks in the given cluster.
- CUDBGResult ( *getConstBankAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t bank, uint32_t offset, uint64_t* address )
- Convert constant bank number and offset into GPU VA.
- CUDBGResult ( *getDeviceName )( uint32_t dev, char* buf, uint32_t sz )
- Get the device name string.
- CUDBGResult ( *getDevicePCIBusInfo )( uint32_t devId, uint32_t* pciBusId, uint32_t* pciDevId )
- Get PCI bus and device ids associated with device devId.
- CUDBGResult ( *getDeviceType )( uint32_t dev, char* buf, uint32_t sz )
- Get the string description of the device.
- CUDBGResult ( *getElfImage )( uint32_t dev, uint32_t sm, uint32_t wp, bool relocated, void* *elfImage, uint64_t* size )
- Get the relocated or non-relocated ELF image and size for the grid on the given device.
- CUDBGResult ( *getElfImage32 )( uint32_t dev, uint32_t sm, uint32_t wp, bool relocated, void* *elfImage, uint32_t* size )
- Get the relocated or non-relocated ELF image and size for the grid on the given device.
- CUDBGResult ( *getElfImageByHandle )( uint32_t devId, uint64_t handle, CUDBGElfImageType type, void* elfImage, uint64_t size )
- Get the relocated or non-relocated ELF image for the given handle on the given device.
- CUDBGResult ( *getErrorStringEx )( char* buf, uint32_t bufSz, uint32_t* msgSz )
- Fills a user-provided buffer with an error message encoded as a null-terminated ASCII string. The error message is specific to the last failed API call and is invalidated after every API call.
- CUDBGResult ( *getGridAttribute )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGAttribute attr, uint64_t* value )
- Get the value of a grid attribute.
- CUDBGResult ( *getGridAttributes )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGAttributeValuePair* pairs, uint32_t numPairs )
- Get several grid attribute values in a single API call.
- CUDBGResult ( *getGridDim )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* gridDim )
- Get the number of blocks in the given grid.
- CUDBGResult ( *getGridDim32 )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim2* gridDim )
- Get the number of blocks in the given grid.
- CUDBGResult ( *getGridInfo )( uint32_t dev, uint64_t gridId64, CUDBGGridInfo* gridInfo )
- Get information about the specified grid. If the context of the grid has already been destroyed, the function will return CUDBG_ERROR_INVALID_GRID, although the grid id is correct.
- CUDBGResult ( *getGridInfo55 )( uint32_t dev, uint64_t gridId64, CUDBGGridInfo55* gridInfo )
- Get information about the specified grid. If the context of the grid has already been destroyed, the function will return CUDBG_ERROR_INVALID_GRID, although the grid id is correct.
- CUDBGResult ( *getGridStatus )( uint32_t dev, uint64_t gridId64, CUDBGGridStatus* status )
- Check whether the grid corresponding to the given gridId is still present on the device.
- CUDBGResult ( *getGridStatus50 )( uint32_t dev, uint32_t gridId, CUDBGGridStatus* status )
- Check whether the grid corresponding to the given gridId is still present on the device.
- CUDBGResult ( *getHostAddrFromDeviceAddr )( uint32_t dev, uint64_t device_addr, uint64_t* host_addr )
- given a device virtual address, return a corresponding system memory virtual address.
- CUDBGResult ( *getLoadedFunctionInfo )( uint32_t devId, uint64_t handle, CUDBGLoadedFunctionInfo* info, uint32_t startIndex, uint32_t numEntries )
- Get the section number and address of loaded functions for a given module.
- CUDBGResult ( *getLoadedFunctionInfo118 )( uint32_t devId, uint64_t handle, CUDBGLoadedFunctionInfo* info, uint32_t numEntries )
- Get the section number and address of loaded functions for a given module.
- CUDBGResult ( *getManagedMemoryRegionInfo )( uint64_t startAddress, CUDBGMemoryInfo* memoryInfo, uint32_t memoryInfo_size, uint32_t* numEntries )
- Returns a sorted list of managed memory regions The sorted list of memory regions starts from a region containing the specified starting address. If the starting address is set to 0, a sorted list of managed memory regions is returned which starts from the managed memory region with the lowest start address.
- CUDBGResult ( *getNextAsyncEvent50 )( CUDBGEvent50* event )
- Copies the next available event in the asynchronous event queue into 'event' and removes it from the queue. The asynchronous event queue is held separate from the normal event queue, and does not require acknowledgement from the debug client.
- CUDBGResult ( *getNextAsyncEvent55 )( CUDBGEvent55* event )
- Copies the next available event in the asynchronous event queue into 'event' and removes it from the queue. The asynchronous event queue is held separate from the normal event queue, and does not require acknowledgement from the debug client.
- CUDBGResult ( *getNextEvent )( CUDBGEventQueueType type, CUDBGEvent* event )
- Copies the next available event into 'event' and removes it from the queue.
- CUDBGResult ( *getNextEvent30 )( CUDBGEvent30* event )
- Copies the next available event in the event queue into 'event' and removes it from the queue.
- CUDBGResult ( *getNextEvent32 )( CUDBGEvent32* event )
- Copies the next available event in the event queue into 'event' and removes it from the queue.
- CUDBGResult ( *getNextEvent42 )( CUDBGEvent42* event )
- Copies the next available event in the event queue into 'event' and removes it from the queue.
- CUDBGResult ( *getNextSyncEvent50 )( CUDBGEvent50* event )
- CUDBGResult ( *getNextSyncEvent55 )( CUDBGEvent55* event )
- Copies the next available event in the synchronous event queue into 'event' and removes it from the queue.
- CUDBGResult ( *getNumDevices )( uint32_t* numDev )
- Get the number of installed CUDA devices.
- CUDBGResult ( *getNumLanes )( uint32_t dev, uint32_t* numLanes )
- Get the number of lanes per warp on the device.
- CUDBGResult ( *getNumPredicates )( uint32_t dev, uint32_t* numPredicates )
- Get the number of predicate registers per lane on the device.
- CUDBGResult ( *getNumRegisters )( uint32_t dev, uint32_t* numRegs )
- Get the number of registers per lane on the device.
- CUDBGResult ( *getNumSMs )( uint32_t dev, uint32_t* numSMs )
- Get the total number of SMs on the device.
- CUDBGResult ( *getNumUniformPredicates )( uint32_t dev, uint32_t* numPredicates )
- Get the number of uniform predicate registers per warp on the device.
- CUDBGResult ( *getNumUniformRegisters )( uint32_t dev, uint32_t* numRegs )
- Get the number of uniform registers per warp on the device.
- CUDBGResult ( *getNumWarps )( uint32_t dev, uint32_t* numWarps )
- Get the number of warps per SM on the device.
- CUDBGResult ( *getPhysicalRegister30 )( uint64_t pc, char* reg, uint32_t* buf, uint32_t sz, uint32_t* numPhysRegs, CUDBGRegClass* regClass )
- Get the physical register number(s) assigned to a virtual register name 'reg' at a given PC, if 'reg' is live at that PC.
- CUDBGResult ( *getPhysicalRegister40 )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t pc, char* reg, uint32_t* buf, uint32_t sz, uint32_t* numPhysRegs, CUDBGRegClass* regClass )
- Get the physical register number(s) assigned to a virtual register name 'reg' at a given PC, if 'reg' is live at that PC.
- CUDBGResult ( *getSmType )( uint32_t dev, char* buf, uint32_t sz )
- Get the SM type of the device.
- CUDBGResult ( *getTID )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* tid )
- Get the ID of the Linux thread hosting the context of the grid.
- CUDBGResult ( *initialize )( )
- Initialize the API.
- CUDBGResult ( *initializeAttachStub )( )
- Initialize the attach stub.
- CUDBGResult ( *isDeviceCodeAddress )( uintptr_t addr, bool* isDeviceAddress )
- Determines whether a virtual address resides within device code.
- CUDBGResult ( *isDeviceCodeAddress55 )( uintptr_t addr, bool* isDeviceAddress )
- Determines whether a virtual address resides within device code. This API is strongly deprecated. Use CUDBGAPI_st::isDeviceCodeAddress instead.
- CUDBGResult ( *lookupDeviceCodeSymbol )( char* symName, bool* symFound, uintptr_t* symAddr )
- Determines whether a symbol represents a function in device code and returns its virtual address.
- CUDBGResult ( *memcheckReadErrorAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* address, ptxStorageKind* storage )
- Get the address that memcheck detected an error on.
- CUDBGResult ( *readActiveLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* activeLanesMask )
- Reads the bitmask of active lanes on a valid warp.
- CUDBGResult ( *readBlockIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockIdx )
- Reads the CUDA block index running on a valid warp.
- CUDBGResult ( *readBlockIdx32 )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim2* blockIdx )
- Reads the two-dimensional CUDA block index running on a valid warp.
- CUDBGResult ( *readBrokenWarps )( uint32_t dev, uint32_t sm, uint64_t* brokenWarpsMask )
- Reads the bitmask of warps that are at a breakpoint on a given SM.
- CUDBGResult ( *readCCRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* val )
- Reads the hardware CC register.
- CUDBGResult ( *readCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )
- Reads the call depth (number of calls) for a given lane.
- CUDBGResult ( *readCallDepth32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* depth )
- Reads the call depth (number of calls) for a given warp.
- CUDBGResult ( *readClusterIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* clusterIdx )
- Reads the CUDA cluster index running on a valid warp.
- CUDBGResult ( *readCodeMemory )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
- Reads content at address in the code memory segment.
- CUDBGResult ( *readConstMemory )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
- Reads content at address in the constant memory segment.
- CUDBGResult ( *readDeviceExceptionState )( uint32_t devId, uint64_t* mask, uint32_t numWords )
- Get the exception state of the SMs on the device.
- CUDBGResult ( *readDeviceExceptionState80 )( uint32_t devId, uint64_t* exceptionSMMask )
- Get the exception state of the SMs on the device.
- CUDBGResult ( *readErrorPC )( uint32_t devId, uint32_t sm, uint32_t wp, uint64_t* errorPC, bool* errorPCValid )
- Get the hardware reported error PC if it exists.
- CUDBGResult ( *readGenericMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
- Reads content at an address in the generic address space. This function determines if the given address falls into the local, shared, or global memory window. It then accesses memory taking into account the hardware co-ordinates provided as inputs.
- CUDBGResult ( *readGlobalMemory )( uint64_t addr, void* buf, uint32_t sz )
- Reads content at an address in the global address space. If the address is valid on more than one device and one of those devices does not support UVA, an error is returned.
- CUDBGResult ( *readGlobalMemory31 )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
- Reads content at address in the global memory segment.
- CUDBGResult ( *readGlobalMemory55 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
- Reads content at address in the global memory segment (entire 40-bit VA on Fermi+).
- CUDBGResult ( *readGridId )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* gridId64 )
- Reads the 64-bit CUDA grid index running on a valid warp.
- CUDBGResult ( *readGridId50 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* gridId )
- Reads the CUDA grid index running on a valid warp.
- CUDBGResult ( *readLaneException )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CUDBGException_t* exception )
- Reads the exception type for a given lane.
- CUDBGResult ( *readLaneStatus )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, bool* error )
- Reads the status of the given lane. For specific error values, use readLaneException.
- CUDBGResult ( *readLocalMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
- Reads content at address in the local memory segment.
- CUDBGResult ( *readPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )
- Reads the PC on the given active lane.
- CUDBGResult ( *readParamMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )
- Reads content at address in the param memory segment.
- CUDBGResult ( *readPinnedMemory )( uint64_t addr, void* buf, uint32_t sz )
- Reads content at pinned address in system memory.
- CUDBGResult ( *readPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t predicates_size, uint32_t* predicates )
- Reads content of hardware predicate registers.
- CUDBGResult ( *readRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t regno, uint32_t* val )
- Reads content of a hardware register.
- CUDBGResult ( *readRegisterRange )( uint32_t devId, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t index, uint32_t registers_size, uint32_t* registers )
- Reads content of a hardware range of hardware registers.
- CUDBGResult ( *readReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )
- Reads the physical return address for a call level.
- CUDBGResult ( *readReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )
- Reads the physical return address for a call level.
- CUDBGResult ( *readSharedMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )
- Reads content at address in the shared memory segment.
- CUDBGResult ( *readSyscallCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )
- Reads the call depth of syscalls for a given lane.
- CUDBGResult ( *readTextureMemory )( uint32_t devId, uint32_t vsm, uint32_t wp, uint32_t id, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )
- This method is no longer supported since CUDA 12.0.
- CUDBGResult ( *readTextureMemoryBindless )( uint32_t devId, uint32_t vsm, uint32_t wp, uint32_t texSymtabIndex, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )
- This method is no longer supported since CUDA 12.0.
- CUDBGResult ( *readThreadIdx )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CuDim3* threadIdx )
- Reads the CUDA thread index running on valid lane.
- CUDBGResult ( *readUniformPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t predicates_size, uint32_t* predicates )
- Reads contents of uniform predicate registers.
- CUDBGResult ( *readUniformRegisterRange )( uint32_t devId, uint32_t sm, uint32_t wp, uint32_t regno, uint32_t registers_size, uint32_t* registers )
- Reads a range of uniform registers.
- CUDBGResult ( *readValidLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* validLanesMask )
- Reads the bitmask of valid lanes on a given warp.
- CUDBGResult ( *readValidWarps )( uint32_t dev, uint32_t sm, uint64_t* validWarpsMask )
- Reads the bitmask of valid warps on a given SM.
- CUDBGResult ( *readVirtualPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )
- Reads the virtual PC on the given active lane.
- CUDBGResult ( *readVirtualReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )
- Reads the virtual return address for a call level.
- CUDBGResult ( *readVirtualReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )
- Reads the virtual return address for a call level.
- CUDBGResult ( *readWarpState )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState* state )
- Get state of a given warp.
- CUDBGResult ( *readWarpState60 )( uint32_t devId, uint32_t sm, uint32_t wp, CUDBGWarpState60* state )
- Get state of a given warp.
- CUDBGResult ( *requestCleanupOnDetach )( uint32_t appResumeFlag )
- Request for cleanup of driver state when detaching.
- CUDBGResult ( *requestCleanupOnDetach55 )( )
- Request for cleanup of driver state when detaching.
- CUDBGResult ( *resumeDevice )( uint32_t dev )
- Resume a suspended CUDA device.
- CUDBGResult ( *resumeWarpsUntilPC )( uint32_t devId, uint32_t sm, uint64_t warpMask, uint64_t virtPC )
- Inserts a temporary breakpoint at the specified virtual PC, and resumes all warps in the specified bitmask on a given SM. As compared to CUDBGAPI_st::resumeDevice, CUDBGAPI_st::resumeWarpsUntilPC provides finer-grain control by resuming a selected set of warps on the same SM. The main intended usage is to accelerate the single-stepping process when the target PC is known in advance. Instead of single-stepping each warp individually until the target PC is hit, the client can issue this API. When this API is used, errors within CUDA kernels will no longer be reported precisely. In the situation where resuming warps is not possible, this API will return CUDBG_ERROR_WARP_RESUME_NOT_POSSIBLE. The client should then fall back to using CUDBGAPI_st::singleStepWarp or CUDBGAPI_st::resumeDevice.
- CUDBGResult ( *setBreakpoint )( uint32_t dev, uint64_t addr )
- Sets a breakpoint at the given instruction address for the given device. Before setting a breakpoint, CUDBGAPI_st::getAdjustedCodeAddress should be called to get the adjusted breakpoint address.
- CUDBGResult ( *setBreakpoint31 )( uint64_t addr )
- Sets a breakpoint at the given instruction address.
- CUDBGResult ( *setKernelLaunchNotificationMode )( CUDBGKernelLaunchNotifyMode mode )
- Set the launch notification policy.
- CUDBGResult ( *setNotifyNewEventCallback )( CUDBGNotifyNewEventCallback callback )
- Provides the API with the function to call to notify the debugger of a new application or device event.
- CUDBGResult ( *setNotifyNewEventCallback31 )( CUDBGNotifyNewEventCallback31 callback, void* data )
- Provides the API with the function to call to notify the debugger of a new application or device event.
- CUDBGResult ( *setNotifyNewEventCallback40 )( CUDBGNotifyNewEventCallback40 callback )
- Provides the API with the function to call to notify the debugger of a new application or device event.
- CUDBGResult ( *singleStepWarp )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t nsteps, uint64_t* warpMask )
- Single step an individual warp nsteps times on a suspended CUDA device. Only the last instruction in a range should be a control flow instruction.
- CUDBGResult ( *singleStepWarp40 )( uint32_t dev, uint32_t sm, uint32_t wp )
- Single step an individual warp on a suspended CUDA device.
- CUDBGResult ( *singleStepWarp41 )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* warpMask )
- Single step an individual warp on a suspended CUDA device.
- CUDBGResult ( *suspendDevice )( uint32_t dev )
- Suspends a running CUDA device.
- CUDBGResult ( *unsetBreakpoint )( uint32_t dev, uint64_t addr )
- Unsets a breakpoint at the given instruction address for the given device.
- CUDBGResult ( *unsetBreakpoint31 )( uint64_t addr )
- Unsets a breakpoint at the given instruction address.
- CUDBGResult ( *writeCCRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t val )
- Writes the hardware CC register.
- CUDBGResult ( *writeGenericMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, const void* buf, uint32_t sz )
- Writes content to an address in the generic address space. This function determines if the given address falls into the local, shared, or global memory window. It then accesses memory taking into account the hardware co-ordinates provided as inputs.
- CUDBGResult ( *writeGlobalMemory )( uint64_t addr, const void* buf, uint32_t sz )
- Writes content to an address in the global address space. If the address is valid on more than one device and one of those devices does not support UVA, an error is returned.
- CUDBGResult ( *writeGlobalMemory31 )( uint32_t dev, uint64_t addr, const void* buf, uint32_t sz )
- Writes content to address in the global memory segment.
- CUDBGResult ( *writeGlobalMemory55 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, const void* buf, uint32_t sz )
- Writes content to address in the global memory segment (entire 40-bit VA on Fermi+).
- CUDBGResult ( *writeLocalMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, const void* buf, uint32_t sz )
- Writes content to address in the local memory segment.
- CUDBGResult ( *writeParamMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, const void* buf, uint32_t sz )
- Writes content to address in the param memory segment.
- CUDBGResult ( *writePinnedMemory )( uint64_t addr, const void* buf, uint32_t sz )
- Writes content to pinned address in system memory.
- CUDBGResult ( *writePredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t predicates_size, const uint32_t* predicates )
- Writes content to hardware predicate registers.
- CUDBGResult ( *writeRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t regno, uint32_t val )
- Writes content to a hardware register.
- CUDBGResult ( *writeSharedMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, const void* buf, uint32_t sz )
- Writes content to address in the shared memory segment.
- CUDBGResult ( *writeUniformPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t predicates_size, const uint32_t* predicates )
- Writes to uniform predicate registers.
- CUDBGResult ( *writeUniformRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t regno, uint32_t val )
- Writes content to a uniform register.
变量
- CUDBGResult ( *CUDBGAPI_st::acknowledgeEvent30 )( CUDBGEvent30* event )
-
通知调试器API该事件已处理完毕。自CUDA 3.0起。
参数
- event
- - pointer to the event that has been processed
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::acknowledgeEvents42 )( )
-
通知调试器API同步事件已处理完毕。自CUDA 3.1起。
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::acknowledgeSyncEvents )( )
-
通知调试器API同步事件已处理完毕。自CUDA 5.0起。
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::clearAttachState )( )
-
在分离前清除特定附加状态。自CUDA 5.0起。
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::disassemble )( uint32_t dev, uint64_t addr, uint32_t* instSize, char* buf, uint32_t sz )
-
反汇编指定指令地址处的指令。自CUDA 3.0起支持。
参数
- dev
- - device index
- addr
- - instruction address
- instSize
- - instruction size (32 or 64 bits)
- buf
- - disassembled instruction buffer
- sz
- - disassembled instruction buffer size
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNKNOWN
- CUDBGResult ( *CUDBGAPI_st::finalize )( )
-
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_COMMUNICATION_FAILURE, CUDBG_ERROR_UNKNOWN
- CUDBGResult ( *CUDBGAPI_st::generateCoredump )( const char* filename, CUDBGCoredumpGenerationFlags flags )
-
为当前GPU状态生成核心转储文件。自CUDA 12.3起
参数
- filename
- - target coredump file name
- flags
- - coredump generation flags/options
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_NOT_SUPPORTED
- CUDBGResult ( *CUDBGAPI_st::getAdjustedCodeAddress )( uint32_t devId, uint64_t address, uint64_t* adjustedAddress, CUDBGAdjAddrAction adjAction )
-
参数
- devId
- - the device index
- address
- adjustedAddress
- - adjusted address
- adjAction
- - whether the adjusted next, previous or current address is needed
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::getBlockDim )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockDim )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- blockDim
- - the returned number of threads in the block
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getClusterDim )( uint32_t dev, uint64_t gridId64, CuDim3* clusterDim )
-
参数
- dev
- - device index
- gridId64
- - grid ID
- clusterDim
- - the returned number of blocks in the cluster
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getConstBankAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t bank, uint32_t offset, uint64_t* address )
-
将常量存储区编号和偏移量转换为GPU虚拟地址。自CUDA 12.3起
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- bank
- - constant bank number
- offset
- - offset within the bank
- address
- - (output) GPU VA
返回
CUDBG_ERROR_NOT_SUPPORTED
- CUDBGResult ( *CUDBGAPI_st::getDeviceName )( uint32_t dev, char* buf, uint32_t sz )
-
参数
- dev
- - device index
- buf
- - the destination buffer
- sz
- - the size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_BUFFER_TOO_SMALL, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getDevicePCIBusInfo )( uint32_t devId, uint32_t* pciBusId, uint32_t* pciDevId )
-
获取与设备devId关联的PCI总线和设备ID。
参数
- devId
- - the cuda device id
- pciBusId
- - pointer where corresponding PCI BUS ID would be stored
- pciDevId
- - pointer where corresponding PCI DEVICE ID would be stored
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_SUCCESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::getDeviceType )( uint32_t dev, char* buf, uint32_t sz )
-
获取设备的字符串描述。自CUDA 3.0起。
另请参阅:
获取SM类型
参数
- dev
- - device index
- buf
- - the destination buffer
- sz
- - the size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_BUFFER_TOO_SMALL, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getElfImage )( uint32_t dev, uint32_t sm, uint32_t wp, bool relocated, void* *elfImage, uint64_t* size )
-
获取指定设备上网格的重定位或非重定位ELF镜像及其大小。自CUDA 4.0起支持。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- relocated
- - set to true to specify the relocated ELF image, false otherwise
- *elfImage
- - pointer to the ELF image
- size
- - size of the ELF image (64 bits)
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getElfImage32 )( uint32_t dev, uint32_t sm, uint32_t wp, bool relocated, void* *elfImage, uint32_t* size )
-
获取指定设备上网格的重定位或非重定位ELF映像及其大小。自CUDA 3.0起支持。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- relocated
- - set to true to specify the relocated ELF image, false otherwise
- *elfImage
- - pointer to the ELF image
- size
- - size of the ELF image (32 bits)
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getElfImageByHandle )( uint32_t devId, uint64_t handle, CUDBGElfImageType type, void* elfImage, uint64_t size )
-
获取给定设备上指定句柄的重定位或非重定位ELF映像。该句柄由ELF映像加载通知事件提供。
自 CUDA 6.0 起。
参数
- devId
- - device index
- handle
- - elf image handle
- type
- - type of the requested ELF image
- elfImage
- - pointer to the ELF image
- size
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getErrorStringEx )( char* buf, uint32_t bufSz, uint32_t* msgSz )
-
使用以空字符结尾的ASCII字符串编码的错误消息填充用户提供的缓冲区。该错误消息针对最近失败的API调用,并在每次API调用后失效。自CUDA 12.2起。
另请参阅:
获取错误字符串
参数
- buf
- - the destination buffer
- bufSz
- - the size of the destination buffer in bytes
- msgSz
- - the size of an error message including the terminating null character.
返回
CUDBG_SUCCESS, CUDBG_ERROR_BUFFER_TOO_SMALL CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getGridAttribute )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGAttribute attr, uint64_t* value )
-
获取网格属性的值。自CUDA 3.1起。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- attr
- - the attribute
- value
- - the returned value of the attribute
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_ATTRIBUTE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getGridAttributes )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGAttributeValuePair* pairs, uint32_t numPairs )
-
通过单次API调用获取多个网格属性值。自CUDA 3.1起支持。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- pairs
- - array of attribute/value pairs
- numPairs
- - the number of attribute/values pairs in the array
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_ATTRIBUTE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getGridDim )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* gridDim )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- gridDim
- - the returned number of blocks in the grid
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getGridDim32 )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim2* gridDim )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- gridDim
- - the returned number of blocks in the grid
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getGridInfo )( uint32_t dev, uint64_t gridId64, CUDBGGridInfo* gridInfo )
-
获取指定网格(grid)的信息。如果该网格的上下文已被销毁,即使网格ID正确,函数也将返回CUDBG_ERROR_INVALID_GRID。自CUDA 12.0起生效。
参数
- dev
- gridId64
- gridInfo
- - pointer to a client allocated structure in which grid info will be returned.
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::getGridInfo55 )( uint32_t dev, uint64_t gridId64, CUDBGGridInfo55* gridInfo )
-
获取指定网格(grid)的信息。如果该网格的上下文已被销毁,即使网格ID正确,函数也将返回CUDBG_ERROR_INVALID_GRID。自CUDA 5.5版本起生效。
参数
- dev
- gridId64
- gridInfo
- - pointer to a client allocated structure in which grid info will be returned.
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::getGridStatus )( uint32_t dev, uint64_t gridId64, CUDBGGridStatus* status )
-
检查给定gridId对应的网格是否仍存在于设备上。自CUDA 5.5起。
参数
- dev
- gridId64
- - 64-bit grid ID
- status
- - enum indicating whether the grid status is INVALID, PENDING, ACTIVE, SLEEPING, TERMINATED or UNDETERMINED
返回
CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INTERNAL
- CUDBGResult ( *CUDBGAPI_st::getGridStatus50 )( uint32_t dev, uint32_t gridId, CUDBGGridStatus* status )
-
检查给定gridId对应的网格是否仍存在于设备上。自CUDA 5.0起。
参数
- dev
- gridId
- - grid ID
- status
- - enum indicating whether the grid status is INVALID, PENDING, ACTIVE, SLEEPING, TERMINATED or UNDETERMINED
返回
CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INTERNAL
- CUDBGResult ( *CUDBGAPI_st::getHostAddrFromDeviceAddr )( uint32_t dev, uint64_t device_addr, uint64_t* host_addr )
-
参数
- dev
- - device index
- device_addr
- - device memory address
- host_addr
- - returned system memory address
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_INVALID_MEMORY_SEGMENT
- CUDBGResult ( *CUDBGAPI_st::getLoadedFunctionInfo )( uint32_t devId, uint64_t handle, CUDBGLoadedFunctionInfo* info, uint32_t startIndex, uint32_t numEntries )
-
获取给定模块中已加载函数的节编号和地址。自CUDA 11.8起
参数
- devId
- handle
- - ELF/cubin image handle
- info
- startIndex
- numEntries
- - number of function load entries to read
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_NOT_SUPPORTED
- CUDBGResult ( *CUDBGAPI_st::getLoadedFunctionInfo118 )( uint32_t devId, uint64_t handle, CUDBGLoadedFunctionInfo* info, uint32_t numEntries )
-
获取给定模块中已加载函数的节编号和地址。自CUDA 11.8起
参数
- devId
- handle
- - ELF/cubin image handle
- info
- numEntries
- - number of function load entries to read
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_NOT_SUPPORTED
- CUDBGResult ( *CUDBGAPI_st::getManagedMemoryRegionInfo )( uint64_t startAddress, CUDBGMemoryInfo* memoryInfo, uint32_t memoryInfo_size, uint32_t* numEntries )
-
返回一个已排序的托管内存区域列表。排序后的内存区域列表从包含指定起始地址的区域开始。如果起始地址设置为0,则返回从最低起始地址的托管内存区域开始的排序列表。自CUDA 6.0起支持此功能。
参数
- startAddress
- - The address that the first region in the list must contain. If the starting address is set to 0, the list of managed memory regions returned starts from the managed memory region with the lowest start address.
- memoryInfo
- - Client-allocated array of memory region records of type CUDBGMemoryInfo.
- memoryInfo_size
- - Number of records of type CUDBGMemoryInfo that memoryInfo can hold.
- numEntries
- - Pointer to a client-allocated variable holding the number of valid entries retured in memoryInfo. Valid entries are continguous and start from memoryInfo[0].
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INTERNAL
- CUDBGResult ( *CUDBGAPI_st::getNextAsyncEvent50 )( CUDBGEvent50* event )
-
将异步事件队列中的下一个可用事件复制到'event'中,并将其从队列中移除。异步事件队列与普通事件队列分开维护,不需要调试客户端的确认。自CUDA 5.0起。
参数
- event
- - pointer to an event container where to copy the event parameters
返回
CUDBG_SUCCESS, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_INVALID_ARGS
- CUDBGResult ( *CUDBGAPI_st::getNextAsyncEvent55 )( CUDBGEvent55* event )
-
将异步事件队列中的下一个可用事件复制到'event'中,并将其从队列中移除。异步事件队列与常规事件队列分开维护,不需要调试客户端的确认。自CUDA 5.5起。
参数
- event
- - pointer to an event container where to copy the event parameters
返回
CUDBG_SUCCESS, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_INVALID_ARGS
- CUDBGResult ( *CUDBGAPI_st::getNextEvent )( CUDBGEventQueueType type, CUDBGEvent* event )
-
将下一个可用事件复制到'event'中,并将其从队列中移除。自CUDA 6.0起。
参数
- type
- - application event queue type
- event
- - pointer to an event container where to copy the event parameters
返回
CUDBG_SUCCESS, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_INVALID_ARGS
- CUDBGResult ( *CUDBGAPI_st::getNextEvent30 )( CUDBGEvent30* event )
-
将事件队列中的下一个可用事件复制到'event'中,并将其从队列中移除。自CUDA 3.0起。
参数
- event
- - pointer to an event container where to copy the event parameters
返回
CUDBG_SUCCESS, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_INVALID_ARGS
- CUDBGResult ( *CUDBGAPI_st::getNextEvent32 )( CUDBGEvent32* event )
-
将事件队列中的下一个可用事件复制到'event'中,并将其从队列中移除。自CUDA 3.1版本起支持。
参数
- event
- - pointer to an event container where to copy the event parameters
返回
CUDBG_SUCCESS, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_INVALID_ARGS
- CUDBGResult ( *CUDBGAPI_st::getNextEvent42 )( CUDBGEvent42* event )
-
将事件队列中的下一个可用事件复制到'event'中,并将其从队列中移除。自CUDA 4.0起。
参数
- event
- - pointer to an event container where to copy the event parameters
返回
CUDBG_SUCCESS, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_INVALID_ARGS
- CUDBGResult ( *CUDBGAPI_st::getNextSyncEvent50 )( CUDBGEvent50* event )
-
自 CUDA 5.0 起。
参数
- event
- - pointer to an event container where to copy the event parameters
返回
CUDBG_SUCCESS, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_INVALID_ARGS
- CUDBGResult ( *CUDBGAPI_st::getNextSyncEvent55 )( CUDBGEvent55* event )
-
将同步事件队列中的下一个可用事件复制到'event'中,并将其从队列中移除。自CUDA 5.5起。
参数
- event
- - pointer to an event container where to copy the event parameters
返回
CUDBG_SUCCESS, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_INVALID_ARGS
- CUDBGResult ( *CUDBGAPI_st::getNumDevices )( uint32_t* numDev )
-
参数
- numDev
- - the returned number of devices
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getNumLanes )( uint32_t dev, uint32_t* numLanes )
-
参数
- dev
- - device index
- numLanes
- - the returned number of lanes
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getNumPredicates )( uint32_t dev, uint32_t* numPredicates )
-
参数
- dev
- - device index
- numPredicates
- - the returned number of predicate registers
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getNumRegisters )( uint32_t dev, uint32_t* numRegs )
-
参数
- dev
- - device index
- numRegs
- - the returned number of registers
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getNumSMs )( uint32_t dev, uint32_t* numSMs )
-
参数
- dev
- - device index
- numSMs
- - the returned number of SMs
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getNumUniformPredicates )( uint32_t dev, uint32_t* numPredicates )
-
参数
- dev
- - device index
- numPredicates
- - the returned number of uniform predicate registers
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getNumUniformRegisters )( uint32_t dev, uint32_t* numRegs )
-
参数
- dev
- - device index
- numRegs
- - the returned number of uniform registers
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getNumWarps )( uint32_t dev, uint32_t* numWarps )
-
参数
- dev
- - device index
- numWarps
- - the returned number of warps
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getPhysicalRegister30 )( uint64_t pc, char* reg, uint32_t* buf, uint32_t sz, uint32_t* numPhysRegs, CUDBGRegClass* regClass )
-
获取在给定程序计数器(PC)位置分配给虚拟寄存器名称'reg'的物理寄存器编号,前提是该寄存器在该PC位置处于活跃状态。 自CUDA 3.0起支持此功能。
参数
- pc
- - Program counter
- reg
- - virtual register index
- buf
- - physical register name(s)
- sz
- - the physical register name buffer size
- numPhysRegs
- - number of physical register names returned
- regClass
- - the class of the physical registers
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UKNOWN_FUNCTION, CUDBG_ERROR_UNKNOWN
- CUDBGResult ( *CUDBGAPI_st::getPhysicalRegister40 )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t pc, char* reg, uint32_t* buf, uint32_t sz, uint32_t* numPhysRegs, CUDBGRegClass* regClass )
-
获取在给定PC处分配给虚拟寄存器名称'reg'的物理寄存器编号(如果'reg'在该PC处是活跃的)。 获取在给定PC处分配给虚拟寄存器名称'reg'的物理寄存器编号(如果'reg'在该PC处是活跃的)。 如果一个虚拟寄存器名称映射到多个物理寄存器,则具有最低物理寄存器索引的物理寄存器将包含虚拟寄存器的最高位, 而具有最高物理寄存器索引的物理寄存器将包含虚拟寄存器的最低位。
自 CUDA 3.1 起。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp indx
- pc
- - Program counter
- reg
- - virtual register index
- buf
- - physical register name(s)
- sz
- - the physical register name buffer size
- numPhysRegs
- - number of physical register names returned
- regClass
- - the class of the physical registers
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UKNOWN_FUNCTION, CUDBG_ERROR_UNKNOWN
- CUDBGResult ( *CUDBGAPI_st::getSmType )( uint32_t dev, char* buf, uint32_t sz )
-
参数
- dev
- - device index
- buf
- - the destination buffer
- sz
- - the size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_BUFFER_TOO_SMALL, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::getTID )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* tid )
-
获取托管网格上下文的Linux线程ID。自CUDA 3.0起。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- tid
- - the returned thread id
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::initialize )( )
-
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN
- CUDBGResult ( *CUDBGAPI_st::initializeAttachStub )( )
-
初始化附加存根。自 CUDA 5.0 起。
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::isDeviceCodeAddress )( uintptr_t addr, bool* isDeviceAddress )
-
判断虚拟地址是否位于设备代码内。自CUDA 3.0起。
参数
- addr
- - virtual address
- isDeviceAddress
- - true if address resides within device code
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::isDeviceCodeAddress55 )( uintptr_t addr, bool* isDeviceAddress )
-
判断一个虚拟地址是否位于设备代码中。此API已强烈不建议使用。请改用CUDBGAPI_st::isDeviceCodeAddress。自CUDA 3.0起。
参数
- addr
- - virtual address
- isDeviceAddress
- - true if address resides within device code
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::lookupDeviceCodeSymbol )( char* symName, bool* symFound, uintptr_t* symAddr )
-
确定一个符号是否表示设备代码中的函数并返回其虚拟地址。自CUDA 3.0起。
参数
- symName
- - symbol name
- symFound
- - set to true if the symbol is found
- symAddr
- - the symbol virtual address if found
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::memcheckReadErrorAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* address, ptxStorageKind* storage )
-
获取memcheck检测到错误的地址。自CUDA 5.0起。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- address
- - returned address detected by memcheck
- storage
- - returned address class of address
返回
CUDBG_ERROR_NOT_SUPPORTED,
- CUDBGResult ( *CUDBGAPI_st::readActiveLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* activeLanesMask )
-
读取有效线程束中活动通道的位掩码。自CUDA 3.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- activeLanesMask
- - the returned bitmask of active lanes
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readBlockIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockIdx )
-
读取运行在有效warp上的CUDA块索引。自CUDA 4.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- blockIdx
- - the returned CUDA block index
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readBlockIdx32 )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim2* blockIdx )
-
读取运行在有效warp上的二维CUDA块索引。自CUDA 3.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- blockIdx
- - the returned CUDA block index
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readBrokenWarps )( uint32_t dev, uint32_t sm, uint64_t* brokenWarpsMask )
-
读取指定SM上处于断点的warp位掩码。自CUDA 3.0起支持。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- brokenWarpsMask
- - the returned bitmask of broken warps
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readCCRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* val )
-
读取硬件CC寄存器。自CUDA 6.5起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- val
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- depth
- - the returned call depth
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readCallDepth32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* depth )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- depth
- - the returned call depth
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readClusterIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* clusterIdx )
-
读取运行在有效warp上的CUDA集群索引。自CUDA 12.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- clusterIdx
- - the returned CUDA cluster index
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readCodeMemory )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
-
读取代码内存段中指定地址的内容。自CUDA 3.0起支持。
另请参阅:
参数
- dev
- - device index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::readConstMemory )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
-
读取常量内存段中指定地址的内容。自CUDA 3.0起支持。
另请参阅:
参数
- dev
- - device index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::readDeviceExceptionState )( uint32_t devId, uint64_t* mask, uint32_t numWords )
-
参数
- devId
- - the cuda device id
- mask
- - Arbitrarily sized bit field containing a 1 at (1 << i) if SM i hit an exception
- numWords
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_SUCCESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::readDeviceExceptionState80 )( uint32_t devId, uint64_t* exceptionSMMask )
-
获取设备上SM(流式多处理器)的异常状态。自CUDA 5.5版本起支持
参数
- devId
- - the cuda device id
- exceptionSMMask
- - Bit field containing a 1 at (1 << i) if SM i hit an exception
返回
CUDBG_ERROR_INVALID_ARGS, CUDBG_SUCCESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::readErrorPC )( uint32_t devId, uint32_t sm, uint32_t wp, uint64_t* errorPC, bool* errorPCValid )
-
获取硬件报告的错误PC(如果存在)。自CUDA 6.0起
参数
- devId
- - the device index
- sm
- - the SM index
- wp
- errorPC
- - PC ofthe exception
- errorPCValid
- - boolean to indicate that the returned error PC is valid
返回
CUDBG_SUCCESS CUDBG_ERROR_UNINITIALIZED CUDBG_ERROR_INVALID_DEVICE CUDBG_ERROR_INVALID_SM CUDBG_ERROR_INVALID_WARP CUDBG_ERROR_INVALID_ARGS CUDBG_ERROR_UNKNOWN_FUNCTION
- CUDBGResult ( *CUDBGAPI_st::readGenericMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
-
读取通用地址空间中某个地址的内容。此函数会判断给定地址是否位于本地、共享或全局内存窗口内,然后根据提供的硬件坐标输入访问内存。自CUDA 6.0起支持该功能。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- addr
- - memory address
- buf
- - buffer
- sz
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM
- CUDBGResult ( *CUDBGAPI_st::readGlobalMemory )( uint64_t addr, void* buf, uint32_t sz )
-
读取全局地址空间中某个地址的内容。如果该地址在多个设备上有效且其中某个设备不支持UVA,则会返回错误。自CUDA 6.0起。
另请参阅:
参数
- addr
- - memory address
- buf
- - buffer
- sz
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM CUDBG_ERROR_AMBIGUOUS_MEMORY_ADDRESS_
- CUDBGResult ( *CUDBGAPI_st::readGlobalMemory31 )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
-
读取全局内存段中指定地址的内容。自CUDA 3.0起支持。
另请参阅:
参数
- dev
- - device index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::readGlobalMemory55 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
-
读取全局内存段中指定地址的内容(Fermi及以上架构支持完整的40位虚拟地址)。自CUDA 3.2版本起支持。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM
- CUDBGResult ( *CUDBGAPI_st::readGridId )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* gridId64 )
-
读取运行在有效warp上的64位CUDA网格索引。自CUDA 5.5起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- gridId64
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readGridId50 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* gridId )
-
读取运行在有效warp上的CUDA网格索引。自CUDA 3.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- gridId
- - the returned CUDA grid index
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readLaneException )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CUDBGException_t* exception )
-
读取给定通道的异常类型。自 CUDA 3.1 起。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- exception
- - the returned exception type
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readLaneStatus )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, bool* error )
-
读取给定通道的状态。如需获取具体的错误值,请使用readLaneException。自CUDA 3.0起支持该功能。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- error
- - true if there is an error
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readLocalMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
-
读取本地内存段中指定地址的内容。自CUDA 3.0起支持。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::readPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )
-
读取给定活动通道上的PC(程序计数器)。自CUDA 3.0起支持。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- pc
- - the returned PC
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readParamMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )
-
读取参数内存段中指定地址的内容。自CUDA 3.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::readPinnedMemory )( uint64_t addr, void* buf, uint32_t sz )
-
读取系统内存中固定地址的内容。自CUDA 3.2起。
另请参阅:
参数
- addr
- - system memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t predicates_size, uint32_t* predicates )
-
读取硬件谓词寄存器的内容。自CUDA 6.5起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- predicates_size
- - number of predicate registers to read
- predicates
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t regno, uint32_t* val )
-
读取硬件寄存器的内容。自CUDA 3.0起支持。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- regno
- - register index
- val
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readRegisterRange )( uint32_t devId, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t index, uint32_t registers_size, uint32_t* registers )
-
读取硬件寄存器范围内内容。自CUDA 6.0起。
另请参阅:
参数
- devId
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- index
- - index of the first register to read
- registers_size
- - number of registers to read
- registers
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- level
- - the specified call level
- ra
- - the returned return address for level
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_ZERO_CALL_DEPTH, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- level
- - the specified call level
- ra
- - the returned return address for level
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_ZERO_CALL_DEPTH, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readSharedMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )
-
读取共享内存段中指定地址的内容。自CUDA 3.0起支持。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::readSyscallCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- depth
- - the returned call depth
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readTextureMemory )( uint32_t devId, uint32_t vsm, uint32_t wp, uint32_t id, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )
-
该方法自CUDA 12.0起不再受支持。
另请参阅:
参数
- devId
- - device index
- vsm
- - SM index
- wp
- - warp index
- id
- - texture id (the value of DW_AT_location attribute in the relocated ELF image)
- dim
- - texture dimension (1 to 4)
- coords
- - array of coordinates of size dim
- buf
- - result buffer
- sz
- - size of the buffer
返回
CUDBG_ERROR_NOT_SUPPORTED,
- CUDBGResult ( *CUDBGAPI_st::readTextureMemoryBindless )( uint32_t devId, uint32_t vsm, uint32_t wp, uint32_t texSymtabIndex, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )
-
该方法自CUDA 12.0起不再受支持。
另请参阅:
参数
- devId
- - device index
- vsm
- - SM index
- wp
- - warp index
- texSymtabIndex
- - global symbol table index of the texture symbol
- dim
- - texture dimension (1 to 4)
- coords
- - array of coordinates of size dim
- buf
- - result buffer
- sz
- - size of the buffer
返回
CUDBG_ERROR_NOT_SUPPORTED
- CUDBGResult ( *CUDBGAPI_st::readThreadIdx )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CuDim3* threadIdx )
-
读取运行在有效通道上的CUDA线程索引。自CUDA 3.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- threadIdx
- - the returned CUDA thread index
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readUniformPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t predicates_size, uint32_t* predicates )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- predicates_size
- - number of predicate registers to read
- predicates
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readUniformRegisterRange )( uint32_t devId, uint32_t sm, uint32_t wp, uint32_t regno, uint32_t registers_size, uint32_t* registers )
-
参数
- devId
- sm
- - SM index
- wp
- - warp index
- regno
- - starting index into uniform register file
- registers_size
- - number of bytes to read
- registers
- - pointer to buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readValidLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* validLanesMask )
-
读取给定warp中有效通道的位掩码。自CUDA 3.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- validLanesMask
- - the returned bitmask of valid lanes
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readValidWarps )( uint32_t dev, uint32_t sm, uint64_t* validWarpsMask )
-
读取给定SM上有效warp的位掩码。自CUDA 3.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- validWarpsMask
- - the returned bitmask of valid warps
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::readVirtualPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- pc
- - the returned PC
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_UNKNOWN_FUNCTION
- CUDBGResult ( *CUDBGAPI_st::readVirtualReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- level
- - the specified call level
- ra
- - the returned virtual return address for level
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_ZERO_CALL_DEPTH, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL
- CUDBGResult ( *CUDBGAPI_st::readVirtualReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- level
- - the specified call level
- ra
- - the returned virtual return address for level
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_ZERO_CALL_DEPTH, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL
- CUDBGResult ( *CUDBGAPI_st::readWarpState )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState* state )
-
获取指定warp的状态。自CUDA 12.0起支持。
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- state
- - pointer to structure that contains warp status
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED,
- CUDBGResult ( *CUDBGAPI_st::readWarpState60 )( uint32_t devId, uint32_t sm, uint32_t wp, CUDBGWarpState60* state )
-
获取指定warp的状态。自CUDA 6.0起。
参数
- devId
- sm
- - SM index
- wp
- - warp index
- state
- - pointer to structure that contains warp status
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED,
- CUDBGResult ( *CUDBGAPI_st::requestCleanupOnDetach )( uint32_t appResumeFlag )
-
请求在分离时清理驱动程序状态。自CUDA 6.0起。
参数
- appResumeFlag
- - value of CUDBG_RESUME_FOR_ATTACH_DETACH as read from the application's process space.
返回
CUDBG_SUCCESS CUDBG_ERROR_COMMUNICATION_FAILURE CUDBG_ERROR_INVALID_ARGS CUDBG_ERROR_INTERNAL
- CUDBGResult ( *CUDBGAPI_st::requestCleanupOnDetach55 )( )
-
请求在分离时清理驱动程序状态。自 CUDA 5.0 起。
返回
CUDBG_SUCCESS CUDBG_ERROR_COMMUNICATION_FAILURE CUDBG_ERROR_INVALID_ARGS CUDBG_ERROR_INTERNAL
- CUDBGResult ( *CUDBGAPI_st::resumeDevice )( uint32_t dev )
-
参数
- dev
- - device index
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_RUNNING_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::resumeWarpsUntilPC )( uint32_t devId, uint32_t sm, uint64_t warpMask, uint64_t virtPC )
-
在指定的虚拟PC处插入一个临时断点,并在给定的SM上恢复指定位掩码中的所有warp。 与CUDBGAPI_st::resumeDevice相比,CUDBGAPI_st::resumeWarpsUntilPC通过在同一SM上恢复选定的warp集合提供了更精细的控制。其主要用途是当目标PC已知时加速单步执行过程。客户端可以调用此API,而不必逐个warp单步执行直到命中目标PC。使用此API时,CUDA内核中的错误将不再被精确报告。在无法恢复warp的情况下,此API将返回CUDBG_ERROR_WARP_RESUME_NOT_POSSIBLE。此时客户端应回退使用CUDBGAPI_st::singleStepWarp或CUDBGAPI_st::resumeDevice。自CUDA 6.0起支持此功能。
另请参阅:
参数
- devId
- - device index
- sm
- - the SM index
- warpMask
- - the bitmask of warps to resume (1 = resume, 0 = do not resume)
- virtPC
- - the virtual PC where the temporary breakpoint will be inserted
返回
CUDBG_SUCCESS CUDBG_ERROR_INVALID_ARGS CUDBG_ERROR_INVALID_DEVICE CUDBG_ERROR_INVALID_SM CUDBG_ERROR_INVALID_WARP_MASK CUDBG_ERROR_WARP_RESUME_NOT_POSSIBLE CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::setBreakpoint )( uint32_t dev, uint64_t addr )
-
在指定设备的给定指令地址处设置断点。在设置断点前,应先调用CUDBGAPI_st::getAdjustedCodeAddress获取调整后的断点地址。自CUDA 3.2版本起支持此功能。
另请参阅:
参数
- dev
- - the device index
- addr
- - instruction address
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::setBreakpoint31 )( uint64_t addr )
-
参数
- addr
- - instruction address
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS
- CUDBGResult ( *CUDBGAPI_st::setKernelLaunchNotificationMode )( CUDBGKernelLaunchNotifyMode mode )
-
设置启动通知策略。自CUDA 5.5起。
参数
- mode
- - mode to deliver kernel launch notifications in
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::setNotifyNewEventCallback )( CUDBGNotifyNewEventCallback callback )
-
提供API功能,用于通知调试器有新应用程序或设备事件。自CUDA 4.1起支持。
参数
- callback
- - the callback function
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::setNotifyNewEventCallback31 )( CUDBGNotifyNewEventCallback31 callback, void* data )
-
提供API功能,用于通知调试器有新应用程序或设备事件。自CUDA 3.0起。
参数
- callback
- - the callback function
- data
- - a pointer to be passed to the callback when called
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::setNotifyNewEventCallback40 )( CUDBGNotifyNewEventCallback40 callback )
-
提供API功能,用于通知调试器有新应用程序或设备事件。自CUDA 3.2起。
参数
- callback
- - the callback function
返回
CUDBG_SUCCESS
- CUDBGResult ( *CUDBGAPI_st::singleStepWarp )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t nsteps, uint64_t* warpMask )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- nsteps
- - number of single steps
- warpMask
- - the warps that have been single-stepped
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_RUNNING_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_UNKNOWN
- CUDBGResult ( *CUDBGAPI_st::singleStepWarp40 )( uint32_t dev, uint32_t sm, uint32_t wp )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_RUNNING_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_UNKNOWN, CUDBG_ERROR_WARP_RESUME_NOT_POSSIBLE
- CUDBGResult ( *CUDBGAPI_st::singleStepWarp41 )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* warpMask )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- warpMask
- - the warps that have been single-stepped
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_RUNNING_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_UNKNOWN
- CUDBGResult ( *CUDBGAPI_st::suspendDevice )( uint32_t dev )
-
参数
- dev
- - device index
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_RUNNING_DEVICE, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::unsetBreakpoint )( uint32_t dev, uint64_t addr )
-
参数
- dev
- - the device index
- addr
- - instruction address
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::unsetBreakpoint31 )( uint64_t addr )
-
参数
- addr
- - instruction address
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::writeCCRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t val )
-
写入硬件CC寄存器。自CUDA 6.5起。
另请参阅:
写入常量内存
写入纹理内存
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- val
- - value to write to the CC register
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::writeGenericMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, const void* buf, uint32_t sz )
-
将内容写入通用地址空间中的某个地址。此函数会判断给定地址是否位于本地、共享或全局内存窗口内,然后根据作为输入提供的硬件坐标访问内存。自CUDA 6.0起支持该功能。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- addr
- - memory address
- buf
- - buffer
- sz
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM
- CUDBGResult ( *CUDBGAPI_st::writeGlobalMemory )( uint64_t addr, const void* buf, uint32_t sz )
-
将内容写入全局地址空间中的某个地址。如果该地址在多个设备上有效,且其中某个设备不支持UVA,则会返回错误。自CUDA 6.0起。
另请参阅:
参数
- addr
- - memory address
- buf
- - buffer
- sz
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM CUDBG_ERROR_AMBIGUOUS_MEMORY_ADDRESS_
- CUDBGResult ( *CUDBGAPI_st::writeGlobalMemory31 )( uint32_t dev, uint64_t addr, const void* buf, uint32_t sz )
-
参数
- dev
- - device index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::writeGlobalMemory55 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, const void* buf, uint32_t sz )
-
将内容写入全局内存段中的地址(Fermi+架构上为完整的40位虚拟地址)。自CUDA 3.2起支持该功能。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM
- CUDBGResult ( *CUDBGAPI_st::writeLocalMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, const void* buf, uint32_t sz )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::writeParamMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, const void* buf, uint32_t sz )
-
将内容写入参数内存段中的地址。自CUDA 3.0起。
另请参阅:
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::writePinnedMemory )( uint64_t addr, const void* buf, uint32_t sz )
-
将内容写入系统内存中的固定地址。自CUDA 3.2起。
另请参阅:
参数
- addr
- - system memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::writePredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t predicates_size, const uint32_t* predicates )
-
将内容写入硬件谓词寄存器。自CUDA 6.5起。
另请参阅:
写入常量内存
写入纹理内存
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- predicates_size
- - number of predicate registers to write
- predicates
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::writeRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t regno, uint32_t val )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- ln
- - lane index
- regno
- - register index
- val
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::writeSharedMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, const void* buf, uint32_t sz )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- addr
- - memory address
- buf
- - buffer
- sz
- - size of the buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED
- CUDBGResult ( *CUDBGAPI_st::writeUniformPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t predicates_size, const uint32_t* predicates )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- predicates_size
- - number of predicate registers to write
- predicates
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED
- CUDBGResult ( *CUDBGAPI_st::writeUniformRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t regno, uint32_t val )
-
参数
- dev
- - device index
- sm
- - SM index
- wp
- - warp index
- regno
- - register index
- val
- - buffer
返回
CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED