mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-05 16:30:24 +08:00
984 lines
57 KiB
Go
984 lines
57 KiB
Go
// Code generated by cmd/gen. DO NOT EDIT.
|
|
|
|
/*
|
|
*
|
|
* Copyright (C) 2019-2025 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* @file ze_api.h
|
|
* @version v1.15-r1.15.31
|
|
*
|
|
*/
|
|
|
|
package gozel
|
|
|
|
import (
|
|
"unsafe"
|
|
|
|
"github.com/fumiama/gozel/internal/zecall"
|
|
)
|
|
|
|
// ZeDeviceGet Retrieves devices within a driver
|
|
// /
|
|
// / @details
|
|
// / - Multiple calls to this function will return identical device handles,
|
|
// / in the same order.
|
|
// / - The number and order of handles returned from this function is
|
|
// / affected by the `ZE_AFFINITY_MASK` and `ZE_ENABLE_PCI_ID_DEVICE_ORDER`
|
|
// / environment variables.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDriver`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCount`
|
|
func ZeDeviceGet(
|
|
hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance
|
|
pCount *uint32, // pCount [in,out] pointer to the number of devices. if count is zero, then the driver shall update the value with the total number of devices available. if count is greater than the number of devices available, then the driver shall update the value with the correct number of devices available.
|
|
phDevices *ZeDeviceHandle, // phDevices [in,out][optional][range(0, *pCount)] array of handle of devices. if count is less than the number of devices available, then driver shall only retrieve that number of devices.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGet", uintptr(hDriver), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phDevices)))
|
|
}
|
|
|
|
// ZeDeviceGetRootDevice Retrieves the root-device of a device handle
|
|
// /
|
|
// / @details
|
|
// / - When the device handle passed does not belong to any root-device,
|
|
// / nullptr is returned.
|
|
// / - Multiple calls to this function will return the same device handle.
|
|
// / - The root-device handle returned by this function does not have access
|
|
// / automatically to the resources
|
|
// / created with the associated sub-device, unless those resources have
|
|
// / been created with a context
|
|
// / explicitly containing both handles.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phRootDevice`
|
|
func ZeDeviceGetRootDevice(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device object
|
|
phRootDevice *ZeDeviceHandle, // phRootDevice [in,out] parent root device.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetRootDevice", uintptr(hDevice), uintptr(unsafe.Pointer(phRootDevice)))
|
|
}
|
|
|
|
// ZeDeviceGetSubDevices Retrieves a sub-device from a device
|
|
// /
|
|
// / @details
|
|
// / - When the device handle passed does not contain any sub-device, a
|
|
// / pCount of 0 is returned.
|
|
// / - Multiple calls to this function will return identical device handles,
|
|
// / in the same order.
|
|
// / - The number of handles returned from this function is affected by the
|
|
// / `ZE_AFFINITY_MASK` environment variable.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - clCreateSubDevices
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCount`
|
|
func ZeDeviceGetSubDevices(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device object
|
|
pCount *uint32, // pCount [in,out] pointer to the number of sub-devices. if count is zero, then the driver shall update the value with the total number of sub-devices available. if count is greater than the number of sub-devices available, then the driver shall update the value with the correct number of sub-devices available.
|
|
phSubdevices *ZeDeviceHandle, // phSubdevices [in,out][optional][range(0, *pCount)] array of handle of sub-devices. if count is less than the number of sub-devices available, then driver shall only retrieve that number of sub-devices.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetSubDevices", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phSubdevices)))
|
|
}
|
|
|
|
// ZeDeviceType (ze_device_type_t) Supported device types
|
|
type ZeDeviceType uintptr
|
|
|
|
const (
|
|
ZE_DEVICE_TYPE_GPU ZeDeviceType = 1 // ZE_DEVICE_TYPE_GPU Graphics Processing Unit
|
|
ZE_DEVICE_TYPE_CPU ZeDeviceType = 2 // ZE_DEVICE_TYPE_CPU Central Processing Unit
|
|
ZE_DEVICE_TYPE_FPGA ZeDeviceType = 3 // ZE_DEVICE_TYPE_FPGA Field Programmable Gate Array
|
|
ZE_DEVICE_TYPE_MCA ZeDeviceType = 4 // ZE_DEVICE_TYPE_MCA Memory Copy Accelerator
|
|
ZE_DEVICE_TYPE_VPU ZeDeviceType = 5 // ZE_DEVICE_TYPE_VPU Vision Processing Unit
|
|
ZE_DEVICE_TYPE_FORCE_UINT32 ZeDeviceType = 0x7fffffff // ZE_DEVICE_TYPE_FORCE_UINT32 Value marking end of ZE_DEVICE_TYPE_* ENUMs
|
|
|
|
)
|
|
|
|
// ZE_MAX_DEVICE_UUID_SIZE Maximum device universal unique id (UUID) size in bytes
|
|
const ZE_MAX_DEVICE_UUID_SIZE = 16
|
|
|
|
// ZeDeviceUuid (ze_device_uuid_t) Device universal unique id (UUID)
|
|
type ZeDeviceUuid struct {
|
|
Id [ZE_MAX_DEVICE_UUID_SIZE]uint8 // Id [out] opaque data representing a device UUID
|
|
|
|
}
|
|
|
|
// ZE_MAX_DEVICE_NAME Maximum device name string size
|
|
const ZE_MAX_DEVICE_NAME = 256
|
|
|
|
// ZeDevicePropertyFlags (ze_device_property_flags_t) Supported device property flags
|
|
type ZeDevicePropertyFlags uint32
|
|
|
|
const (
|
|
ZE_DEVICE_PROPERTY_FLAG_INTEGRATED ZeDevicePropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_PROPERTY_FLAG_INTEGRATED Device is integrated with the Host.
|
|
ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE ZeDevicePropertyFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE Device handle used for query represents a sub-device.
|
|
ZE_DEVICE_PROPERTY_FLAG_ECC ZeDevicePropertyFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_PROPERTY_FLAG_ECC Device supports error correction memory access.
|
|
ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING ZeDevicePropertyFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING Device supports on-demand page-faulting.
|
|
ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 ZeDevicePropertyFlags = 0x7fffffff // ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_PROPERTY_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeDeviceProperties (ze_device_properties_t) Device properties queried using ::zeDeviceGetProperties
|
|
type ZeDeviceProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Type ZeDeviceType // Type [out] generic device type
|
|
Vendorid uint32 // Vendorid [out] vendor id from PCI configuration
|
|
Deviceid uint32 // Deviceid [out] device id from PCI configuration. Note, the device id uses little-endian format.
|
|
Flags ZeDevicePropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_property_flag_t
|
|
Subdeviceid uint32 // Subdeviceid [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE is set.
|
|
Coreclockrate uint32 // Coreclockrate [out] Clock rate for device core.
|
|
Maxmemallocsize uint64 // Maxmemallocsize [out] Maximum memory allocation size.
|
|
Maxhardwarecontexts uint32 // Maxhardwarecontexts [out] Maximum number of logical hardware contexts.
|
|
Maxcommandqueuepriority uint32 // Maxcommandqueuepriority [out] Maximum priority for command queues. Higher value is higher priority.
|
|
Numthreadspereu uint32 // Numthreadspereu [out] Maximum number of threads per EU.
|
|
Physicaleusimdwidth uint32 // Physicaleusimdwidth [out] The physical EU simd width.
|
|
Numeuspersubslice uint32 // Numeuspersubslice [out] Maximum number of EUs per sub-slice.
|
|
Numsubslicesperslice uint32 // Numsubslicesperslice [out] Maximum number of sub-slices per slice.
|
|
Numslices uint32 // Numslices [out] Maximum number of slices.
|
|
Timerresolution uint64 // Timerresolution [out] Returns the resolution of device timer used for profiling, timestamps, etc. When stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES the units are in nanoseconds. When stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 units are in cycles/sec
|
|
Timestampvalidbits uint32 // Timestampvalidbits [out] Returns the number of valid bits in the timestamp value.
|
|
Kerneltimestampvalidbits uint32 // Kerneltimestampvalidbits [out] Returns the number of valid bits in the kernel timestamp values
|
|
Uuid ZeDeviceUuid // Uuid [out] universal unique identifier. Note: Subdevices will have their own uuid.
|
|
Name [ZE_MAX_DEVICE_NAME]byte // Name [out] Device name
|
|
|
|
}
|
|
|
|
// ZeDeviceThread (ze_device_thread_t) Device thread identifier.
|
|
type ZeDeviceThread struct {
|
|
Slice uint32 // Slice [in,out] the slice number. Must be `UINT32_MAX` (all) or less than the `numSlices` member of ::ze_device_properties_t.
|
|
Subslice uint32 // Subslice [in,out] the sub-slice number within its slice. Must be `UINT32_MAX` (all) or less than the `numSubslicesPerSlice` member of ::ze_device_properties_t.
|
|
Eu uint32 // Eu [in,out] the EU number within its sub-slice. Must be `UINT32_MAX` (all) or less than the `numEUsPerSubslice` member of ::ze_device_properties_t.
|
|
Thread uint32 // Thread [in,out] the thread number within its EU. Must be `UINT32_MAX` (all) or less than the `numThreadsPerEU` member of ::ze_device_properties_t.
|
|
|
|
}
|
|
|
|
// ZeDeviceGetProperties Retrieves properties of the device.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - clGetDeviceInfo
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pDeviceProperties`
|
|
func ZeDeviceGetProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pDeviceProperties *ZeDeviceProperties, // pDeviceProperties [in,out] query result for device properties
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pDeviceProperties)))
|
|
}
|
|
|
|
// ZE_SUBGROUPSIZE_COUNT Maximum number of subgroup sizes supported.
|
|
const ZE_SUBGROUPSIZE_COUNT = 8
|
|
|
|
// ZeDeviceComputeProperties (ze_device_compute_properties_t) Device compute properties queried using ::zeDeviceGetComputeProperties
|
|
type ZeDeviceComputeProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Maxtotalgroupsize uint32 // Maxtotalgroupsize [out] Maximum items per compute group. (groupSizeX * groupSizeY * groupSizeZ) <= maxTotalGroupSize
|
|
Maxgroupsizex uint32 // Maxgroupsizex [out] Maximum items for X dimension in group
|
|
Maxgroupsizey uint32 // Maxgroupsizey [out] Maximum items for Y dimension in group
|
|
Maxgroupsizez uint32 // Maxgroupsizez [out] Maximum items for Z dimension in group
|
|
Maxgroupcountx uint32 // Maxgroupcountx [out] Maximum groups that can be launched for x dimension
|
|
Maxgroupcounty uint32 // Maxgroupcounty [out] Maximum groups that can be launched for y dimension
|
|
Maxgroupcountz uint32 // Maxgroupcountz [out] Maximum groups that can be launched for z dimension
|
|
Maxsharedlocalmemory uint32 // Maxsharedlocalmemory [out] Maximum shared local memory per group.
|
|
Numsubgroupsizes uint32 // Numsubgroupsizes [out] Number of subgroup sizes supported. This indicates number of entries in subGroupSizes.
|
|
Subgroupsizes [ZE_SUBGROUPSIZE_COUNT]uint32 // Subgroupsizes [out] Size group sizes supported.
|
|
|
|
}
|
|
|
|
// ZeDeviceGetComputeProperties Retrieves compute properties of the device.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - clGetDeviceInfo
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pComputeProperties`
|
|
func ZeDeviceGetComputeProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pComputeProperties *ZeDeviceComputeProperties, // pComputeProperties [in,out] query result for compute properties
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetComputeProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pComputeProperties)))
|
|
}
|
|
|
|
// ZE_MAX_NATIVE_KERNEL_UUID_SIZE Maximum native kernel universal unique id (UUID) size in bytes
|
|
const ZE_MAX_NATIVE_KERNEL_UUID_SIZE = 16
|
|
|
|
// ZeNativeKernelUuid (ze_native_kernel_uuid_t) Native kernel universal unique id (UUID)
|
|
type ZeNativeKernelUuid struct {
|
|
Id [ZE_MAX_NATIVE_KERNEL_UUID_SIZE]uint8 // Id [out] opaque data representing a native kernel UUID
|
|
|
|
}
|
|
|
|
// ZeDeviceModuleFlags (ze_device_module_flags_t) Supported device module flags
|
|
type ZeDeviceModuleFlags uint32
|
|
|
|
const (
|
|
ZE_DEVICE_MODULE_FLAG_FP16 ZeDeviceModuleFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_MODULE_FLAG_FP16 Device supports 16-bit floating-point operations
|
|
ZE_DEVICE_MODULE_FLAG_FP64 ZeDeviceModuleFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_MODULE_FLAG_FP64 Device supports 64-bit floating-point operations
|
|
ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS ZeDeviceModuleFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS Device supports 64-bit atomic operations
|
|
ZE_DEVICE_MODULE_FLAG_DP4A ZeDeviceModuleFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_DEVICE_MODULE_FLAG_DP4A Device supports four component dot product and accumulate operations
|
|
ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 ZeDeviceModuleFlags = 0x7fffffff // ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_MODULE_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeDeviceFpFlags (ze_device_fp_flags_t) Supported floating-Point capability flags
|
|
type ZeDeviceFpFlags uint32
|
|
|
|
const (
|
|
ZE_DEVICE_FP_FLAG_DENORM ZeDeviceFpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_FP_FLAG_DENORM Supports denorms
|
|
ZE_DEVICE_FP_FLAG_INF_NAN ZeDeviceFpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_FP_FLAG_INF_NAN Supports INF and quiet NaNs
|
|
ZE_DEVICE_FP_FLAG_ROUND_TO_NEAREST ZeDeviceFpFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_FP_FLAG_ROUND_TO_NEAREST Supports rounding to nearest even rounding mode
|
|
ZE_DEVICE_FP_FLAG_ROUND_TO_ZERO ZeDeviceFpFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_DEVICE_FP_FLAG_ROUND_TO_ZERO Supports rounding to zero.
|
|
ZE_DEVICE_FP_FLAG_ROUND_TO_INF ZeDeviceFpFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_DEVICE_FP_FLAG_ROUND_TO_INF Supports rounding to both positive and negative INF.
|
|
ZE_DEVICE_FP_FLAG_FMA ZeDeviceFpFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_DEVICE_FP_FLAG_FMA Supports IEEE754-2008 fused multiply-add.
|
|
ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT ZeDeviceFpFlags = /* ZE_BIT(6) */ (1 << 6) // ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT Supports rounding as defined by IEEE754 for divide and sqrt
|
|
|
|
///< operations.
|
|
|
|
ZE_DEVICE_FP_FLAG_SOFT_FLOAT ZeDeviceFpFlags = /* ZE_BIT(7) */ (1 << 7) // ZE_DEVICE_FP_FLAG_SOFT_FLOAT Uses software implementation for basic floating-point operations.
|
|
ZE_DEVICE_FP_FLAG_FORCE_UINT32 ZeDeviceFpFlags = 0x7fffffff // ZE_DEVICE_FP_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_FP_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeDeviceModuleProperties (ze_device_module_properties_t) Device module properties queried using ::zeDeviceGetModuleProperties
|
|
type ZeDeviceModuleProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Spirvversionsupported uint32 // Spirvversionsupported [out] Maximum supported SPIR-V version. Returns zero if SPIR-V is not supported. Contains major and minor attributes, use ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION.
|
|
Flags ZeDeviceModuleFlags // Flags [out] 0 or a valid combination of ::ze_device_module_flag_t
|
|
Fp16flags ZeDeviceFpFlags // Fp16flags [out] Capabilities for half-precision floating-point operations. returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP16 is not set) or a combination of ::ze_device_fp_flag_t.
|
|
Fp32flags ZeDeviceFpFlags // Fp32flags [out] Capabilities for single-precision floating-point operations. returns a combination of ::ze_device_fp_flag_t.
|
|
Fp64flags ZeDeviceFpFlags // Fp64flags [out] Capabilities for double-precision floating-point operations. returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP64 is not set) or a combination of ::ze_device_fp_flag_t.
|
|
Maxargumentssize uint32 // Maxargumentssize [out] Maximum kernel argument size that is supported.
|
|
Printfbuffersize uint32 // Printfbuffersize [out] Maximum size of internal buffer that holds output of printf calls from kernel.
|
|
Nativekernelsupported ZeNativeKernelUuid // Nativekernelsupported [out] Compatibility UUID of supported native kernel. UUID may or may not be the same across driver release, devices, or operating systems. Application is responsible for ensuring UUID matches before creating module using previously created native kernel.
|
|
|
|
}
|
|
|
|
// ZeDeviceGetModuleProperties Retrieves module properties of the device
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pModuleProperties`
|
|
func ZeDeviceGetModuleProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pModuleProperties *ZeDeviceModuleProperties, // pModuleProperties [in,out] query result for module properties
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetModuleProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pModuleProperties)))
|
|
}
|
|
|
|
// ZeCommandQueueGroupPropertyFlags (ze_command_queue_group_property_flags_t) Supported command queue group property flags
|
|
type ZeCommandQueueGroupPropertyFlags uint32
|
|
|
|
const (
|
|
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE Command queue group supports enqueing compute commands.
|
|
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY Command queue group supports enqueing copy commands.
|
|
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS Command queue group supports cooperative kernels.
|
|
|
|
///< See ::zeCommandListAppendLaunchCooperativeKernel for more details.
|
|
|
|
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS Command queue groups supports metric queries.
|
|
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 ZeCommandQueueGroupPropertyFlags = 0x7fffffff // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeCommandQueueGroupProperties (ze_command_queue_group_properties_t) Command queue group properties queried using
|
|
// / ::zeDeviceGetCommandQueueGroupProperties
|
|
type ZeCommandQueueGroupProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeCommandQueueGroupPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_command_queue_group_property_flag_t
|
|
Maxmemoryfillpatternsize uintptr // Maxmemoryfillpatternsize [out] maximum `pattern_size` supported by command queue group. See ::zeCommandListAppendMemoryFill for more details.
|
|
Numqueues uint32 // Numqueues [out] the number of physical engines within the group.
|
|
|
|
}
|
|
|
|
// ZeDeviceGetCommandQueueGroupProperties Retrieves command queue group properties of the device.
|
|
// /
|
|
// / @details
|
|
// / - Properties are reported for each physical command queue group
|
|
// / available on the device.
|
|
// / - Multiple calls to this function will return properties in the same
|
|
// / order.
|
|
// / - The order in which the properties are returned is defined by the
|
|
// / command queue group's ordinal.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - **vkGetPhysicalDeviceQueueFamilyProperties**
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCount`
|
|
func ZeDeviceGetCommandQueueGroupProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pCount *uint32, // pCount [in,out] pointer to the number of available command queue groups. If count is zero, then the driver shall update the value with the total number of command queue groups available. If count is less than the number of command queue groups available, then the driver shall only retrieve command queue group properties for the given number of command queue groups. If count is greater than or equal to the number of command queue groups available, then the driver shall retrieve command queue group properties for all available command queue groups.
|
|
pCommandQueueGroupProperties *ZeCommandQueueGroupProperties, // pCommandQueueGroupProperties [in,out][optional][range(0, *pCount)] array of query results for command queue group properties. If count is less than the number of command queue groups available, then the driver shall only retrieve that number of command queue group properties. The order of properties in the array corresponds to the command queue group ordinal.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetCommandQueueGroupProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pCommandQueueGroupProperties)))
|
|
}
|
|
|
|
// ZeDeviceMemoryPropertyFlags (ze_device_memory_property_flags_t) Supported device memory property flags
|
|
type ZeDeviceMemoryPropertyFlags uint32
|
|
|
|
const (
|
|
ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD ZeDeviceMemoryPropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD reserved for future use
|
|
ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceMemoryPropertyFlags = 0x7fffffff // ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_PROPERTY_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeDeviceMemoryProperties (ze_device_memory_properties_t) Device local memory properties queried using
|
|
// / ::zeDeviceGetMemoryProperties
|
|
type ZeDeviceMemoryProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeDeviceMemoryPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_memory_property_flag_t
|
|
Maxclockrate uint32 // Maxclockrate [out] Maximum clock rate for device memory.
|
|
Maxbuswidth uint32 // Maxbuswidth [out] Maximum bus width between device and memory.
|
|
Totalsize uint64 // Totalsize [out] Total memory size in bytes that is available to the device.
|
|
Name [ZE_MAX_DEVICE_NAME]byte // Name [out] Memory name
|
|
|
|
}
|
|
|
|
// ZeDeviceGetMemoryProperties Retrieves local memory properties of the device.
|
|
// /
|
|
// / @details
|
|
// / - Properties are reported for each physical memory type supported by the
|
|
// / device.
|
|
// / - Multiple calls to this function will return properties in the same
|
|
// / order.
|
|
// / - The order in which the properties are returned defines the device's
|
|
// / local memory ordinal.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - clGetDeviceInfo
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCount`
|
|
func ZeDeviceGetMemoryProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pCount *uint32, // pCount [in,out] pointer to the number of memory properties. if count is zero, then the driver shall update the value with the total number of memory properties available. if count is greater than the number of memory properties available, then the driver shall update the value with the correct number of memory properties available.
|
|
pMemProperties *ZeDeviceMemoryProperties, // pMemProperties [in,out][optional][range(0, *pCount)] array of query results for memory properties. if count is less than the number of memory properties available, then driver shall only retrieve that number of memory properties.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetMemoryProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pMemProperties)))
|
|
}
|
|
|
|
// ZeMemoryAccessCapFlags (ze_memory_access_cap_flags_t) Memory access capability flags
|
|
// /
|
|
// / @details
|
|
// / - Supported access capabilities for different types of memory
|
|
// / allocations
|
|
type ZeMemoryAccessCapFlags uint32
|
|
|
|
const (
|
|
ZE_MEMORY_ACCESS_CAP_FLAG_RW ZeMemoryAccessCapFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_MEMORY_ACCESS_CAP_FLAG_RW Supports load/store access
|
|
ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC ZeMemoryAccessCapFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC Supports atomic access
|
|
ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT ZeMemoryAccessCapFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT Supports concurrent access
|
|
ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC ZeMemoryAccessCapFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC Supports concurrent atomic access
|
|
ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 ZeMemoryAccessCapFlags = 0x7fffffff // ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 Value marking end of ZE_MEMORY_ACCESS_CAP_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeDeviceMemoryAccessProperties (ze_device_memory_access_properties_t) Device memory access properties queried using
|
|
// / ::zeDeviceGetMemoryAccessProperties
|
|
type ZeDeviceMemoryAccessProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Hostalloccapabilities ZeMemoryAccessCapFlags // Hostalloccapabilities [out] host memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t.
|
|
Devicealloccapabilities ZeMemoryAccessCapFlags // Devicealloccapabilities [out] device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t.
|
|
Sharedsingledevicealloccapabilities ZeMemoryAccessCapFlags // Sharedsingledevicealloccapabilities [out] shared, single-device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t.
|
|
Sharedcrossdevicealloccapabilities ZeMemoryAccessCapFlags // Sharedcrossdevicealloccapabilities [out] shared, cross-device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t.
|
|
Sharedsystemalloccapabilities ZeMemoryAccessCapFlags // Sharedsystemalloccapabilities [out] shared, system memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t.
|
|
|
|
}
|
|
|
|
// ZeDeviceGetMemoryAccessProperties Retrieves memory access properties of the device.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - clGetDeviceInfo
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pMemAccessProperties`
|
|
func ZeDeviceGetMemoryAccessProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pMemAccessProperties *ZeDeviceMemoryAccessProperties, // pMemAccessProperties [in,out] query result for memory access properties
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetMemoryAccessProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pMemAccessProperties)))
|
|
}
|
|
|
|
// ZeDeviceCachePropertyFlags (ze_device_cache_property_flags_t) Supported cache control property flags
|
|
type ZeDeviceCachePropertyFlags uint32
|
|
|
|
const (
|
|
ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL ZeDeviceCachePropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL Device support User Cache Control (i.e. SLM section vs Generic Cache)
|
|
ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceCachePropertyFlags = 0x7fffffff // ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_CACHE_PROPERTY_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeDeviceCacheProperties (ze_device_cache_properties_t) Device cache properties queried using ::zeDeviceGetCacheProperties
|
|
type ZeDeviceCacheProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeDeviceCachePropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_cache_property_flag_t
|
|
Cachesize uintptr // Cachesize [out] Per-cache size, in bytes
|
|
|
|
}
|
|
|
|
// ZeDeviceGetCacheProperties Retrieves cache properties of the device
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - clGetDeviceInfo
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCount`
|
|
func ZeDeviceGetCacheProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pCount *uint32, // pCount [in,out] pointer to the number of cache properties. if count is zero, then the driver shall update the value with the total number of cache properties available. if count is greater than the number of cache properties available, then the driver shall update the value with the correct number of cache properties available.
|
|
pCacheProperties *ZeDeviceCacheProperties, // pCacheProperties [in,out][optional][range(0, *pCount)] array of query results for cache properties. if count is less than the number of cache properties available, then driver shall only retrieve that number of cache properties.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetCacheProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pCacheProperties)))
|
|
}
|
|
|
|
// ZeDeviceImageProperties (ze_device_image_properties_t) Device image properties queried using ::zeDeviceGetImageProperties
|
|
type ZeDeviceImageProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Maximagedims1d uint32 // Maximagedims1d [out] Maximum image dimensions for 1D resources. if 0, then 1D images are unsupported.
|
|
Maximagedims2d uint32 // Maximagedims2d [out] Maximum image dimensions for 2D resources. if 0, then 2D images are unsupported.
|
|
Maximagedims3d uint32 // Maximagedims3d [out] Maximum image dimensions for 3D resources. if 0, then 3D images are unsupported.
|
|
Maximagebuffersize uint64 // Maximagebuffersize [out] Maximum image buffer size in bytes. if 0, then buffer images are unsupported.
|
|
Maximagearrayslices uint32 // Maximagearrayslices [out] Maximum image array slices. if 0, then image arrays are unsupported.
|
|
Maxsamplers uint32 // Maxsamplers [out] Max samplers that can be used in kernel. if 0, then sampling is unsupported.
|
|
Maxreadimageargs uint32 // Maxreadimageargs [out] Returns the maximum number of simultaneous image objects that can be read from by a kernel. if 0, then reading images is unsupported.
|
|
Maxwriteimageargs uint32 // Maxwriteimageargs [out] Returns the maximum number of simultaneous image objects that can be written to by a kernel. if 0, then writing images is unsupported.
|
|
|
|
}
|
|
|
|
// ZeDeviceGetImageProperties Retrieves image properties of the device
|
|
// /
|
|
// / @details
|
|
// / - See ::zeImageGetProperties for format-specific capabilities.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pImageProperties`
|
|
func ZeDeviceGetImageProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pImageProperties *ZeDeviceImageProperties, // pImageProperties [in,out] query result for image properties
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetImageProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pImageProperties)))
|
|
}
|
|
|
|
// ZeDeviceExternalMemoryProperties (ze_device_external_memory_properties_t) Device external memory import and export properties
|
|
type ZeDeviceExternalMemoryProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Memoryallocationimporttypes ZeExternalMemoryTypeFlags // Memoryallocationimporttypes [out] Supported external memory import types for memory allocations.
|
|
Memoryallocationexporttypes ZeExternalMemoryTypeFlags // Memoryallocationexporttypes [out] Supported external memory export types for memory allocations.
|
|
Imageimporttypes ZeExternalMemoryTypeFlags // Imageimporttypes [out] Supported external memory import types for images.
|
|
Imageexporttypes ZeExternalMemoryTypeFlags // Imageexporttypes [out] Supported external memory export types for images.
|
|
|
|
}
|
|
|
|
// ZeDeviceGetExternalMemoryProperties Retrieves external memory import and export of the device
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pExternalMemoryProperties`
|
|
func ZeDeviceGetExternalMemoryProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
pExternalMemoryProperties *ZeDeviceExternalMemoryProperties, // pExternalMemoryProperties [in,out] query result for external memory properties
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetExternalMemoryProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pExternalMemoryProperties)))
|
|
}
|
|
|
|
// ZeDeviceP2pPropertyFlags (ze_device_p2p_property_flags_t) Supported device peer-to-peer property flags
|
|
type ZeDeviceP2pPropertyFlags uint32
|
|
|
|
const (
|
|
ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS ZeDeviceP2pPropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS Device supports access between peer devices.
|
|
ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS ZeDeviceP2pPropertyFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS Device supports atomics between peer devices.
|
|
ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceP2pPropertyFlags = 0x7fffffff // ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_P2P_PROPERTY_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeDeviceP2pProperties (ze_device_p2p_properties_t) Device peer-to-peer properties queried using
|
|
// / ::zeDeviceGetP2PProperties
|
|
type ZeDeviceP2pProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeDeviceP2pPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_p2p_property_flag_t
|
|
|
|
}
|
|
|
|
// ZeDeviceGetP2PProperties Retrieves peer-to-peer properties between one device and a peer
|
|
// / devices
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / + `nullptr == hPeerDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pP2PProperties`
|
|
func ZeDeviceGetP2PProperties(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device performing the access
|
|
hPeerDevice ZeDeviceHandle, // hPeerDevice [in] handle of the peer device with the allocation
|
|
pP2PProperties *ZeDeviceP2pProperties, // pP2PProperties [in,out] Peer-to-Peer properties between source and peer device
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetP2PProperties", uintptr(hDevice), uintptr(hPeerDevice), uintptr(unsafe.Pointer(pP2PProperties)))
|
|
}
|
|
|
|
// ZeDeviceCanAccessPeer Queries if one device can directly access peer device allocations
|
|
// /
|
|
// / @details
|
|
// / - Any device can access any other device within a node through a
|
|
// / scale-up fabric.
|
|
// / - The following are conditions for CanAccessPeer query.
|
|
// / + If both device and peer device are the same then return true.
|
|
// / + If both sub-device and peer sub-device are the same then return
|
|
// / true.
|
|
// / + If both are sub-devices and share the same parent device then
|
|
// / return true.
|
|
// / + If both device and remote device are connected by a direct or
|
|
// / indirect scale-up fabric or over PCIe (same root complex or shared
|
|
// / PCIe switch) then true.
|
|
// / + If both sub-device and remote parent device (and vice-versa) are
|
|
// / connected by a direct or indirect scale-up fabric or over PCIe
|
|
// / (same root complex or shared PCIe switch) then true.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / + `nullptr == hPeerDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == value`
|
|
func ZeDeviceCanAccessPeer(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device performing the access
|
|
hPeerDevice ZeDeviceHandle, // hPeerDevice [in] handle of the peer device with the allocation
|
|
value *ZeBool, // value [out] returned access capability
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceCanAccessPeer", uintptr(hDevice), uintptr(hPeerDevice), uintptr(unsafe.Pointer(value)))
|
|
}
|
|
|
|
// ZeDeviceGetStatus Returns current status of the device.
|
|
// /
|
|
// / @details
|
|
// / - Once a device is reset, this call will update the OS handle attached
|
|
// / to the device handle.
|
|
// / - The application may call this function from simultaneous threads with
|
|
// / the same device handle.
|
|
// / - The implementation of this function must be thread-safe.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / + Device is available for use.
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / + Device is lost; must be reset for use.
|
|
func ZeDeviceGetStatus(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetStatus", uintptr(hDevice))
|
|
}
|
|
|
|
// ZeDeviceGetGlobalTimestamps Returns synchronized Host and device global timestamps.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads with
|
|
// / the same device handle.
|
|
// / - The implementation of this function must be thread-safe.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == hostTimestamp`
|
|
// / + `nullptr == deviceTimestamp`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + The feature is not supported by the underlying platform.
|
|
func ZeDeviceGetGlobalTimestamps(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
hostTimestamp *uint64, // hostTimestamp [out] value of the Host's global timestamp that correlates with the Device's global timestamp value.
|
|
deviceTimestamp *uint64, // deviceTimestamp [out] value of the Device's global timestamp that correlates with the Host's global timestamp value.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetGlobalTimestamps", uintptr(hDevice), uintptr(unsafe.Pointer(hostTimestamp)), uintptr(unsafe.Pointer(deviceTimestamp)))
|
|
}
|
|
|
|
// ZeDeviceSynchronize Synchronizes all command queues related to the device.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads with
|
|
// / the same device handle.
|
|
// / - The implementation of this function should be thread-safe.
|
|
// / - This function blocks until all preceding submissions to all queues on
|
|
// / the device are completed.
|
|
// / - This function returns an error if device execution fails.
|
|
// / - This function hangs indefinitely if the device is blocked on a
|
|
// / non-signaled event.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
func ZeDeviceSynchronize(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceSynchronize", uintptr(hDevice))
|
|
}
|
|
|
|
// ZeDeviceEventPropertiesFlags (ze_device_event_properties_flags_t) Supported Event properties flags
|
|
type ZeDeviceEventPropertiesFlags uint32
|
|
|
|
const (
|
|
ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE ZeDeviceEventPropertiesFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE Counter-based Event with external aggregate storage supported
|
|
ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_IPC ZeDeviceEventPropertiesFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_IPC Counter-based Event IPC sharing supported
|
|
ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION ZeDeviceEventPropertiesFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION Counter-based Event with external sync allocation supported
|
|
ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT ZeDeviceEventPropertiesFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT Counter-based Event waiting for external interrupt id supported
|
|
ZE_DEVICE_EVENT_PROPERTIES_FLAG_FORCE_UINT32 ZeDeviceEventPropertiesFlags = 0x7fffffff // ZE_DEVICE_EVENT_PROPERTIES_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_EVENT_PROPERTIES_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeDeviceEventProperties (ze_device_event_properties_t) Device Event properties struct. Can be passed as pNext to
|
|
// / ::ze_device_properties_t to obtain properties
|
|
type ZeDeviceEventProperties struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeDeviceEventPropertiesFlags // Flags [out] Supported Event properties. Valid combination of ::ze_device_event_properties_flag_t.
|
|
|
|
}
|
|
|
|
// ZeDeviceGetAggregatedCopyOffloadIncrementValue Returns unified increment value that can be used for Counter Based
|
|
// / Events created with
|
|
// / ::ze_event_counter_based_external_aggregate_storage_desc_t
|
|
// /
|
|
// / @details
|
|
// / - Value is applicable only to this specific device
|
|
// / - It may be used, when user is not able define number of internal driver
|
|
// / operations during given append call, for example dividing copy into
|
|
// / multiple engines. More details can be found in programming guide.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == incrementValue`
|
|
func ZeDeviceGetAggregatedCopyOffloadIncrementValue(
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
|
|
incrementValue *uint32, // incrementValue [out] increment value that can be used for Event creation
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeDeviceGetAggregatedCopyOffloadIncrementValue", uintptr(hDevice), uintptr(unsafe.Pointer(incrementValue)))
|
|
}
|