get_compute_device_infoget_compute_device_infoGetComputeDeviceInfoGetComputeDeviceInfoget_compute_device_info (算子)
名称
get_compute_device_infoget_compute_device_infoGetComputeDeviceInfoGetComputeDeviceInfoget_compute_device_info — 获取计算设备上的信息。
签名
描述
算子 get_compute_device_infoget_compute_device_infoGetComputeDeviceInfoGetComputeDeviceInfoGetComputeDeviceInfoget_compute_device_info returns information on a
compute device. In contrast to get_compute_device_paramget_compute_device_paramGetComputeDeviceParamGetComputeDeviceParamGetComputeDeviceParamget_compute_device_param, only
static information is queried, so that the device does not have to
be opened (see open_compute_deviceopen_compute_deviceOpenComputeDeviceOpenComputeDeviceOpenComputeDeviceopen_compute_device) and activated
(see activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device).
The following information can be queried:
- 'vendor'
-
Vendor of the compute device.
- 'name'
-
Name of the compute device.
- 'platform_version'
-
Version of the compute device platform. E.g., OpenCL version
in the case of OpenCL devices.
- 'driver_version'
-
Version of the device driver.
- 'extensions'
-
Supported OpenCL extensions.
- 'image_support'
-
'true'"true""true""true""true""true" if the device supports image objects.
- 'image2d_max_width'
-
Maximum width of OpenCL image objects.
- 'image2d_max_height'
-
Maximum height of OpenCL image objects.
- 'max_mem_alloc_size'
Maximum size (in bytes) of an OpenCL memory block.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
DeviceIdentifierDeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
计算设备句柄。
InfoNameInfoNameInfoNameInfoNameinfoNameinfo_name (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of Information to query.
默认值:
'name'
"name"
"name"
"name"
"name"
"name"
值列表:
'driver_version'"driver_version""driver_version""driver_version""driver_version""driver_version", 'extensions'"extensions""extensions""extensions""extensions""extensions", 'image2d_max_height'"image2d_max_height""image2d_max_height""image2d_max_height""image2d_max_height""image2d_max_height", 'image2d_max_width'"image2d_max_width""image2d_max_width""image2d_max_width""image2d_max_width""image2d_max_width", 'image_support'"image_support""image_support""image_support""image_support""image_support", 'max_mem_alloc_size'"max_mem_alloc_size""max_mem_alloc_size""max_mem_alloc_size""max_mem_alloc_size""max_mem_alloc_size", 'name'"name""name""name""name""name", 'platform_version'"platform_version""platform_version""platform_version""platform_version""platform_version", 'vendor'"vendor""vendor""vendor""vendor""vendor"
InfoInfoInfoInfoinfoinfo (输出控制) string(-array) → HTupleSequence[Union[str, int, float]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
Returned information.
结果
算子 get_compute_device_infoget_compute_device_infoGetComputeDeviceInfoGetComputeDeviceInfoGetComputeDeviceInfoget_compute_device_info 在参数正确时返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
query_available_compute_devicesquery_available_compute_devicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesquery_available_compute_devices
可能的后继
activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device
模块
基础