ST_CheckGPU

更新时间: 2026-03-28 03:14:27

Checks whether a GPU is available in the current runtime environment of ApsaraDB for RDS and returns the GPU's CUDA device properties if one is found.

Syntax

text ST_CheckGPU();

Description

ST_CheckGPU checks whether a GPU can be identified in the current runtime environment. If a GPU is present, the function returns a text string listing key CUDA device properties. Run this function before running GPU-accelerated raster operations to confirm that the environment is GPU-enabled.

Return value

Returns a text string containing semicolon-separated CUDA device properties in the following format:

[GPU prop]<property>=<value>; <property>=<value>; ...
PropertyDescription
multiProcessorCountNumber of streaming multiprocessors on the GPU. Higher values indicate greater parallel processing capacity.
sharedMemPerBlockShared memory available per thread block, in bytes. Affects how much data each block can process without accessing slower global memory.
maxThreadsPerBlockMaximum number of threads per block. Determines the upper limit of parallelism within a single block.

Example

SELECT st_checkgpu();

Output:

[GPU prop]multiProcessorCount=20; sharedMemPerBlock=49152; maxThreadsPerBlock=1024

(1 row)

In this output, the GPU has 20 streaming multiprocessors, 48 KiB (49,152 bytes) of shared memory per block, and supports up to 1,024 threads per block.

What's next

After confirming GPU availability, use GPU-accelerated raster functions to process spatial data with improved performance.

上一篇: ST_CreateChunkTable 下一篇: ST_AKId
阿里云首页 云数据库 RDS 相关技术圈