Description Usage Arguments Value References See Also
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
();
- cudaDevAttrMaxTexture
1DWidth: Maximum 1D texture width;
- cudaDevAttrMaxTexture
1DLinearWidth: Maximum width for a 1D texture bound
to linear memory;
- cudaDevAttrMaxTexture
1DMipmappedWidth: Maximum mipmapped 1D texture width;
- cudaDevAttrMaxTexture
2DWidth: Maximum 2D texture width;
- cudaDevAttrMaxTexture
2DHeight: Maximum 2D texture height;
- cudaDevAttrMaxTexture
2DLinearWidth: Maximum width for a 2D texture
bound to linear memory;
- cudaDevAttrMaxTexture
2DLinearHeight: Maximum height for a 2D texture
bound to linear memory;
- cudaDevAttrMaxTexture
2DLinearPitch: Maximum pitch in bytes for a 2D
texture bound to linear memory;
- cudaDevAttrMaxTexture
2DMipmappedWidth: Maximum mipmapped 2D texture
width;
- cudaDevAttrMaxTexture
2DMipmappedHeight: Maximum mipmapped 2D texture
height;
- cudaDevAttrMaxTexture
3DWidth: Maximum 3D texture width;
- cudaDevAttrMaxTexture
3DHeight: Maximum 3D texture height;
- cudaDevAttrMaxTexture
3DDepth: Maximum 3D texture depth;
- cudaDevAttrMaxTexture
3DWidthAlt: Alternate maximum 3D texture width,
0 if no alternate maximum 3D texture size is supported;
- cudaDevAttrMaxTexture
3DHeightAlt: Alternate maximum 3D texture height,
0 if no alternate maximum 3D texture size is supported;
- cudaDevAttrMaxTexture
3DDepthAlt: Alternate maximum 3D texture depth,
0 if no alternate maximum 3D texture size is supported;
- cudaDevAttrMaxTextureCubemapWidth
: Maximum cubemap texture width or
height;
- cudaDevAttrMaxTexture
1DLayeredWidth: Maximum 1D layered texture width;
- cudaDevAttrMaxTexture
1DLayeredLayers: Maximum layers in a 1D layered
texture;
- cudaDevAttrMaxTexture
2DLayeredWidth: Maximum 2D layered texture width;
- cudaDevAttrMaxTexture
2DLayeredHeight: Maximum 2D layered texture height;
- cudaDevAttrMaxTexture
2DLayeredLayers: Maximum layers in a 2D layered
texture;
- cudaDevAttrMaxTextureCubemapLayeredWidth
: Maximum cubemap layered
texture width or height;
- cudaDevAttrMaxTextureCubemapLayeredLayers
: Maximum layers in a cubemap
layered texture;
- cudaDevAttrMaxSurface
1DWidth: Maximum 1D surface width;
- cudaDevAttrMaxSurface
2DWidth: Maximum 2D surface width;
- cudaDevAttrMaxSurface
2DHeight: Maximum 2D surface height;
- cudaDevAttrMaxSurface
3DWidth: Maximum 3D surface width;
- cudaDevAttrMaxSurface
3DHeight: Maximum 3D surface height;
- cudaDevAttrMaxSurface
3DDepth: Maximum 3D surface depth;
- cudaDevAttrMaxSurface
1DLayeredWidth: Maximum 1D layered surface width;
- cudaDevAttrMaxSurface
1DLayeredLayers: Maximum layers in a 1D layered
surface;
- cudaDevAttrMaxSurface
2DLayeredWidth: Maximum 2D layered surface width;
- cudaDevAttrMaxSurface
2DLayeredHeight: Maximum 2D layered surface height;
- cudaDevAttrMaxSurface
2DLayeredLayers: 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;
- cudaDevAttrL
2CacheSize: 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;
1 |
attr |
Device attribute to query |
device |
Device number to query |
value
http://docs.nvidia.com/cuda/cuda-driver-api/index.html
cudaGetDeviceCount
cudaGetDevice
cudaSetDevice
cudaChooseDevice
cudaGetDeviceProperties
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.