ST_CheckGPU
Returns GPU properties for the current AnalyticDB for PostgreSQL runtime environment.
Syntax
text ST_CheckGPU();Description
ST_CheckGPU() reports key GPU hardware properties available to the current AnalyticDB for PostgreSQL instance. Run this function to confirm that GPU acceleration is active before executing GPU-dependent spatial operations.
The function takes no parameters and returns a text value. When a GPU is detected, the return value contains a semicolon-separated list of CUDA device properties.
Return value
When a GPU is detected, the output follows this format:
[GPU prop]multiProcessorCount=<value>; sharedMemPerBlock=<value>; maxThreadsPerBlock=<value>| Property | Description |
|---|---|
multiProcessorCount | Number of streaming multiprocessors (SMs) on the GPU |
sharedMemPerBlock | Maximum shared memory available per thread block, in bytes |
maxThreadsPerBlock | Maximum number of threads per thread block |
Example
SELECT ST_CheckGPU();Output:
st_checkgpu
----------------------------------------------------------------------------------------
[GPU prop]multiProcessorCount=20; sharedMemPerBlock=49152; maxThreadsPerBlock=1024
(1 row)In this example:
The GPU has 20 streaming multiprocessors.
Each thread block can use up to 49,152 bytes (48 KiB) of shared memory.
Each thread block supports up to 1,024 threads.
What's next
To learn about GPU-accelerated spatial functions available in AnalyticDB for PostgreSQL, see the Ganos spatial extension documentation.