cudaDeviceGetAttribute: Returns information about the device

Description Usage Arguments Value References See Also

Description

Returns the integer value of the attribute attr on device device. The supported attributes are: - cudaDevAttrMaxThreadsPerBlock: Maximum number of threads per block; - cudaDevAttrMaxBlockDimX: Maximum x-dimension of a block; - cudaDevAttrMaxBlockDimY: Maximum y-dimension of a block; - cudaDevAttrMaxBlockDimZ: Maximum z-dimension of a block; - cudaDevAttrMaxGridDimX: Maximum x-dimension of a grid; - cudaDevAttrMaxGridDimY: Maximum y-dimension of a grid; - cudaDevAttrMaxGridDimZ: Maximum z-dimension of a grid; - cudaDevAttrMaxSharedMemoryPerBlock: Maximum amount of shared memory available to a thread block in bytes; this amount is shared by all thread blocks simultaneously resident on a multiprocessor; - cudaDevAttrTotalConstantMemory: Memory available on device for __constant__ variables in a CUDA C kernel in bytes; - cudaDevAttrWarpSize: Warp size in threads; - cudaDevAttrMaxPitch: Maximum pitch in bytes allowed by the memory copy functions that involve memory regions allocated through cudaMallocPitch(); - cudaDevAttrMaxTexture1DWidth: Maximum 1D texture width; - cudaDevAttrMaxTexture1DLinearWidth: Maximum width for a 1D texture bound to linear memory; - cudaDevAttrMaxTexture1DMipmappedWidth: Maximum mipmapped 1D texture width; - cudaDevAttrMaxTexture2DWidth: Maximum 2D texture width; - cudaDevAttrMaxTexture2DHeight: Maximum 2D texture height; - cudaDevAttrMaxTexture2DLinearWidth: Maximum width for a 2D texture bound to linear memory; - cudaDevAttrMaxTexture2DLinearHeight: Maximum height for a 2D texture bound to linear memory; - cudaDevAttrMaxTexture2DLinearPitch: Maximum pitch in bytes for a 2D texture bound to linear memory; - cudaDevAttrMaxTexture2DMipmappedWidth: Maximum mipmapped 2D texture width; - cudaDevAttrMaxTexture2DMipmappedHeight: Maximum mipmapped 2D texture height; - cudaDevAttrMaxTexture3DWidth: Maximum 3D texture width; - cudaDevAttrMaxTexture3DHeight: Maximum 3D texture height; - cudaDevAttrMaxTexture3DDepth: Maximum 3D texture depth; - cudaDevAttrMaxTexture3DWidthAlt: Alternate maximum 3D texture width, 0 if no alternate maximum 3D texture size is supported; - cudaDevAttrMaxTexture3DHeightAlt: Alternate maximum 3D texture height, 0 if no alternate maximum 3D texture size is supported; - cudaDevAttrMaxTexture3DDepthAlt: Alternate maximum 3D texture depth, 0 if no alternate maximum 3D texture size is supported; - cudaDevAttrMaxTextureCubemapWidth: Maximum cubemap texture width or height; - cudaDevAttrMaxTexture1DLayeredWidth: Maximum 1D layered texture width; - cudaDevAttrMaxTexture1DLayeredLayers: Maximum layers in a 1D layered texture; - cudaDevAttrMaxTexture2DLayeredWidth: Maximum 2D layered texture width; - cudaDevAttrMaxTexture2DLayeredHeight: Maximum 2D layered texture height; - cudaDevAttrMaxTexture2DLayeredLayers: Maximum layers in a 2D layered texture; - cudaDevAttrMaxTextureCubemapLayeredWidth: Maximum cubemap layered texture width or height; - cudaDevAttrMaxTextureCubemapLayeredLayers: Maximum layers in a cubemap layered texture; - cudaDevAttrMaxSurface1DWidth: Maximum 1D surface width; - cudaDevAttrMaxSurface2DWidth: Maximum 2D surface width; - cudaDevAttrMaxSurface2DHeight: Maximum 2D surface height; - cudaDevAttrMaxSurface3DWidth: Maximum 3D surface width; - cudaDevAttrMaxSurface3DHeight: Maximum 3D surface height; - cudaDevAttrMaxSurface3DDepth: Maximum 3D surface depth; - cudaDevAttrMaxSurface1DLayeredWidth: Maximum 1D layered surface width; - cudaDevAttrMaxSurface1DLayeredLayers: Maximum layers in a 1D layered surface; - cudaDevAttrMaxSurface2DLayeredWidth: Maximum 2D layered surface width; - cudaDevAttrMaxSurface2DLayeredHeight: Maximum 2D layered surface height; - cudaDevAttrMaxSurface2DLayeredLayers: Maximum layers in a 2D layered surface; - cudaDevAttrMaxSurfaceCubemapWidth: Maximum cubemap surface width; - cudaDevAttrMaxSurfaceCubemapLayeredWidth: Maximum cubemap layered surface width; - cudaDevAttrMaxSurfaceCubemapLayeredLayers: Maximum layers in a cubemap layered surface; - cudaDevAttrMaxRegistersPerBlock: Maximum number of 32-bit registers available to a thread block; this number is shared by all thread blocks simultaneously resident on a multiprocessor; - cudaDevAttrClockRate: Peak clock frequency in kilohertz; - cudaDevAttrTextureAlignment: Alignment requirement; texture base addresses aligned to textureAlign bytes do not need an offset applied to texture fetches; - cudaDevAttrTexturePitchAlignment: Pitch alignment requirement for 2D texture references bound to pitched memory; - cudaDevAttrGpuOverlap: 1 if the device can concurrently copy memory between host and device while executing a kernel, or 0 if not; - cudaDevAttrMultiProcessorCount: Number of multiprocessors on the device; - cudaDevAttrKernelExecTimeout: 1 if there is a run time limit for kernels executed on the device, or 0 if not; - cudaDevAttrIntegrated: 1 if the device is integrated with the memory subsystem, or 0 if not; - cudaDevAttrCanMapHostMemory: 1 if the device can map host memory into the CUDA address space, or 0 if not; - cudaDevAttrComputeMode: Compute mode is the compute mode that the device is currently in. Available modes are as follows: - cudaComputeModeDefault: Default mode - Device is not restricted and multiple threads can use cudaSetDevice() with this device. - cudaComputeModeExclusive: Compute-exclusive mode - Only one thread will be able to use cudaSetDevice() with this device. - cudaComputeModeProhibited: Compute-prohibited mode - No threads can use cudaSetDevice() with this device. - cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - Many threads in one process will be able to use cudaSetDevice() with this device. - cudaDevAttrConcurrentKernels: 1 if the device supports executing multiple kernels within the same context simultaneously, or 0 if not. It is not guaranteed that multiple kernels will be resident on the device concurrently so this feature should not be relied upon for correctness; - cudaDevAttrEccEnabled: 1 if error correction is enabled on the device, 0 if error correction is disabled or not supported by the device; - cudaDevAttrPciBusId: PCI bus identifier of the device; - cudaDevAttrPciDeviceId: PCI device (also known as slot) identifier of the device; - cudaDevAttrTccDriver: 1 if the device is using a TCC driver. TCC is only available on Tesla hardware running Windows Vista or later; - cudaDevAttrMemoryClockRate: Peak memory clock frequency in kilohertz; - cudaDevAttrGlobalMemoryBusWidth: Global memory bus width in bits; - cudaDevAttrL2CacheSize: Size of L2 cache in bytes. 0 if the device doesn't have L2 cache; - cudaDevAttrMaxThreadsPerMultiProcessor: Maximum resident threads per multiprocessor; - cudaDevAttrUnifiedAddressing: 1 if the device shares a unified address space with the host, or 0 if not; - cudaDevAttrComputeCapabilityMajor: Major compute capability version number; - cudaDevAttrComputeCapabilityMinor: Minor compute capability version number;

Usage

1

Arguments

attr

Device attribute to query

device

Device number to query

Value

value

References

http://docs.nvidia.com/cuda/cuda-driver-api/index.html

See Also

cudaGetDeviceCount cudaGetDevice cudaSetDevice cudaChooseDevice cudaGetDeviceProperties


duncantl/RCUDA documentation built on May 15, 2019, 5:26 p.m.