Linux command
clinfo 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Display all OpenCL information
clinfo
Display only platform and device list
clinfo -l
Display in raw format
clinfo --raw
Display offline devices
clinfo --offline
Display output in JSON format
clinfo --json
说明
clinfo displays detailed information about OpenCL platforms and devices available on the system. It queries the OpenCL runtime to report capabilities, memory sizes, supported features, and extensions. The output includes information for each OpenCL platform (vendor implementation) and its devices (GPUs, CPUs, accelerators). Details include device type, compute units, memory sizes, supported OpenCL versions, and available extensions. This information is essential for developing and debugging OpenCL applications, verifying driver installations, and understanding hardware capabilities for GPU computing tasks.
参数
- -l, --list
- List platforms and devices only.
- --raw
- Raw output format.
- -a, --all-props
- Try to retrieve all properties, even those not officially supported.
- -A, --always-all-props
- Like -a, but also shows errors for unsupported properties.
- --offline
- Show offline devices.
- --json
- Output raw data in JSON format (experimental).
- -h, --human
- Human-readable format (default).
- -v, --version
- Show program version.
FAQ
What is the clinfo command used for?
clinfo displays detailed information about OpenCL platforms and devices available on the system. It queries the OpenCL runtime to report capabilities, memory sizes, supported features, and extensions. The output includes information for each OpenCL platform (vendor implementation) and its devices (GPUs, CPUs, accelerators). Details include device type, compute units, memory sizes, supported OpenCL versions, and available extensions. This information is essential for developing and debugging OpenCL applications, verifying driver installations, and understanding hardware capabilities for GPU computing tasks.
How do I run a basic clinfo example?
Run `clinfo` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -l, --list do in clinfo?
List platforms and devices only.