mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-05 16:30:24 +08:00
396 lines
21 KiB
Go
396 lines
21 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"
|
|
)
|
|
|
|
// ZE_MUTABLE_COMMAND_LIST_EXP_NAME Mutable Command List Extension Name
|
|
const ZE_MUTABLE_COMMAND_LIST_EXP_NAME = "ZE_experimental_mutable_command_list"
|
|
|
|
// ZeMutableCommandListExpVersion (ze_mutable_command_list_exp_version_t) Mutable Command List Extension Version(s)
|
|
type ZeMutableCommandListExpVersion uintptr
|
|
const (
|
|
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 version 1.0
|
|
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 version 1.1
|
|
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT latest known version
|
|
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 ZeMutableCommandListExpVersion = 0x7fffffff // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeMutableCommandExpFlags (ze_mutable_command_exp_flags_t) Mutable command flags
|
|
type ZeMutableCommandExpFlags uint32
|
|
const (
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS ZeMutableCommandExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS kernel arguments
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT ZeMutableCommandExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT kernel group count
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE ZeMutableCommandExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE kernel group size
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET ZeMutableCommandExpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET kernel global offset
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT ZeMutableCommandExpFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT command signal event
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS ZeMutableCommandExpFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS command wait events
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION ZeMutableCommandExpFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION command kernel
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS ZeMutableCommandExpFlags = /* ZE_BIT(7) */(( 1 << 7 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS graph arguments
|
|
ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 ZeMutableCommandExpFlags = 0x7fffffff // ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_EXP_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeMutableCommandIdExpDesc (ze_mutable_command_id_exp_desc_t) Mutable command identifier descriptor
|
|
type ZeMutableCommandIdExpDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeMutableCommandExpFlags // Flags [in] mutable command flags. - must be 0 (default, equivalent to setting all flags bar kernel instruction), or a valid combination of ::ze_mutable_command_exp_flag_t - in order to include kernel instruction mutation, ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION must be explictly included
|
|
|
|
}
|
|
|
|
// ZeMutableCommandListExpFlags (ze_mutable_command_list_exp_flags_t) Mutable command list flags
|
|
type ZeMutableCommandListExpFlags uint32
|
|
const (
|
|
ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED ZeMutableCommandListExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED reserved
|
|
ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 ZeMutableCommandListExpFlags = 0x7fffffff // ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeMutableCommandListExpProperties (ze_mutable_command_list_exp_properties_t) Mutable command list properties
|
|
type ZeMutableCommandListExpProperties 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).
|
|
Mutablecommandlistflags ZeMutableCommandListExpFlags // Mutablecommandlistflags [out] mutable command list flags
|
|
Mutablecommandflags ZeMutableCommandExpFlags // Mutablecommandflags [out] mutable command flags
|
|
|
|
}
|
|
|
|
// ZeMutableCommandListExpDesc (ze_mutable_command_list_exp_desc_t) Mutable command list descriptor
|
|
type ZeMutableCommandListExpDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeMutableCommandListExpFlags // Flags [in] mutable command list flags. - must be 0 (default) or a valid combination of ::ze_mutable_command_list_exp_flag_t
|
|
|
|
}
|
|
|
|
// ZeMutableCommandsExpDesc (ze_mutable_commands_exp_desc_t) Mutable commands descriptor
|
|
type ZeMutableCommandsExpDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags uint32 // Flags [in] must be 0, this field is reserved for future use
|
|
|
|
}
|
|
|
|
// ZeMutableKernelArgumentExpDesc (ze_mutable_kernel_argument_exp_desc_t) Mutable kernel argument descriptor
|
|
type ZeMutableKernelArgumentExpDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Commandid uint64 // Commandid [in] command identifier
|
|
Argindex uint32 // Argindex [in] kernel argument index
|
|
Argsize uintptr // Argsize [in] kernel argument size
|
|
Pargvalue unsafe.Pointer // Pargvalue [in] pointer to kernel argument value
|
|
|
|
}
|
|
|
|
// ZeMutableGroupCountExpDesc (ze_mutable_group_count_exp_desc_t) Mutable kernel group count descriptor
|
|
type ZeMutableGroupCountExpDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Commandid uint64 // Commandid [in] command identifier
|
|
Pgroupcount *ZeGroupCount // Pgroupcount [in] pointer to group count
|
|
|
|
}
|
|
|
|
// ZeMutableGroupSizeExpDesc (ze_mutable_group_size_exp_desc_t) Mutable kernel group size descriptor
|
|
type ZeMutableGroupSizeExpDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Commandid uint64 // Commandid [in] command identifier
|
|
Groupsizex uint32 // Groupsizex [in] group size for X dimension to use for the kernel
|
|
Groupsizey uint32 // Groupsizey [in] group size for Y dimension to use for the kernel
|
|
Groupsizez uint32 // Groupsizez [in] group size for Z dimension to use for the kernel
|
|
|
|
}
|
|
|
|
// ZeMutableGlobalOffsetExpDesc (ze_mutable_global_offset_exp_desc_t) Mutable kernel global offset descriptor
|
|
type ZeMutableGlobalOffsetExpDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Commandid uint64 // Commandid [in] command identifier
|
|
Offsetx uint32 // Offsetx [in] global offset for X dimension to use for this kernel
|
|
Offsety uint32 // Offsety [in] global offset for Y dimension to use for this kernel
|
|
Offsetz uint32 // Offsetz [in] global offset for Z dimension to use for this kernel
|
|
|
|
}
|
|
|
|
// ZeMutableGraphArgumentExpDesc (ze_mutable_graph_argument_exp_desc_t) Mutable graph argument descriptor
|
|
type ZeMutableGraphArgumentExpDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Commandid uint64 // Commandid [in] command identifier
|
|
Argindex uint32 // Argindex [in] graph argument index
|
|
Pargvalue unsafe.Pointer // Pargvalue [in] pointer to graph argument value
|
|
|
|
}
|
|
|
|
// ZeCommandListGetNextCommandIdExp Returns a unique command identifier for the next command to be
|
|
/// appended to a command list.
|
|
///
|
|
/// @details
|
|
/// - This function may only be called for a mutable command list.
|
|
/// - This function may not be called on a closed command list.
|
|
/// - This function may be called from simultaneous threads with the same
|
|
/// command list handle.
|
|
/// - 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 == hCommandList`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
/// + `nullptr == desc`
|
|
/// + `nullptr == pCommandId`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
|
|
/// + `0xff < desc->flags`
|
|
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
|
|
func ZeCommandListGetNextCommandIdExp(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
desc *ZeMutableCommandIdExpDesc, // desc [in] pointer to mutable command identifier descriptor
|
|
pCommandId *uint64, // pCommandId [out] pointer to mutable command identifier to be written
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListGetNextCommandIdExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(pCommandId)))
|
|
}
|
|
|
|
// ZeCommandListGetNextCommandIdWithKernelsExp Returns a unique command identifier for the next command to be
|
|
/// appended to a command list. Provides possible kernel handles for
|
|
/// kernel mutation when ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION
|
|
/// flag is present.
|
|
///
|
|
/// @details
|
|
/// - This function may only be called for a mutable command list.
|
|
/// - This function may not be called on a closed command list.
|
|
/// - This function may be called from simultaneous threads with the same
|
|
/// command list handle.
|
|
/// - 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 == hCommandList`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
/// + `nullptr == desc`
|
|
/// + `nullptr == pCommandId`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
|
|
/// + `0xff < desc->flags`
|
|
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
|
|
func ZeCommandListGetNextCommandIdWithKernelsExp(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
desc *ZeMutableCommandIdExpDesc, // desc [in][out] pointer to mutable command identifier descriptor
|
|
numKernels uint32, // numKernels [in][optional] number of entries on phKernels list
|
|
phKernels *ZeKernelHandle, // phKernels [in][optional][range(0, numKernels)] list of kernels that user can switch between using ::zeCommandListUpdateMutableCommandKernelsExp call
|
|
pCommandId *uint64, // pCommandId [out] pointer to mutable command identifier to be written
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListGetNextCommandIdWithKernelsExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc)), uintptr(numKernels), uintptr(unsafe.Pointer(phKernels)), uintptr(unsafe.Pointer(pCommandId)))
|
|
}
|
|
|
|
// ZeCommandListUpdateMutableCommandsExp Updates mutable commands.
|
|
///
|
|
/// @details
|
|
/// - This function may only be called for a mutable command list.
|
|
/// - The application must synchronize mutable command list execution before
|
|
/// calling this function.
|
|
/// - The application must close a mutable command list after completing all
|
|
/// updates.
|
|
/// - This function must not be called from simultaneous threads with the
|
|
/// same command list handle.
|
|
/// - 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_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 == hCommandList`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
/// + `nullptr == desc`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
/// + Invalid kernel argument or not matching update descriptor provided
|
|
func ZeCommandListUpdateMutableCommandsExp(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
desc *ZeMutableCommandsExpDesc, // desc [in] pointer to mutable commands descriptor; multiple descriptors may be chained via `pNext` member
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandsExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc)))
|
|
}
|
|
|
|
// ZeCommandListUpdateMutableCommandSignalEventExp Updates the signal event for a mutable command in a mutable command
|
|
/// list.
|
|
///
|
|
/// @details
|
|
/// - This function may only be called for a mutable command list.
|
|
/// - The type, scope and flags of the signal event must match those of the
|
|
/// source command.
|
|
/// - The application must synchronize mutable command list execution before
|
|
/// calling this function.
|
|
/// - The application must close a mutable command list after completing all
|
|
/// updates.
|
|
/// - This function must not be called from simultaneous threads with the
|
|
/// same command list handle.
|
|
/// - 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 == hCommandList`
|
|
func ZeCommandListUpdateMutableCommandSignalEventExp(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
commandId uint64, // commandId [in] command identifier
|
|
hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandSignalEventExp", uintptr(hCommandList), uintptr(commandId), uintptr(hSignalEvent))
|
|
}
|
|
|
|
// ZeCommandListUpdateMutableCommandWaitEventsExp Updates the wait events for a mutable command in a mutable command
|
|
/// list.
|
|
///
|
|
/// @details
|
|
/// - This function may only be called for a mutable command list.
|
|
/// - The number of wait events must match that of the source command.
|
|
/// - The type, scope and flags of the wait events must match those of the
|
|
/// source command.
|
|
/// - Passing `nullptr` as the wait events will update the command to not
|
|
/// wait on any events prior to dispatch.
|
|
/// - Passing `nullptr` as an event on event wait list will remove event
|
|
/// dependency from this wait list slot.
|
|
/// - The application must synchronize mutable command list execution before
|
|
/// calling this function.
|
|
/// - The application must close a mutable command list after completing all
|
|
/// updates.
|
|
/// - This function must not be called from simultaneous threads with the
|
|
/// same command list handle.
|
|
/// - 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 == hCommandList`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_SIZE
|
|
/// + The `numWaitEvents` parameter does not match that of the original command.
|
|
func ZeCommandListUpdateMutableCommandWaitEventsExp(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
commandId uint64, // commandId [in] command identifier
|
|
numWaitEvents uint32, // numWaitEvents [in][optional] the number of wait events
|
|
phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandWaitEventsExp", uintptr(hCommandList), uintptr(commandId), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
|
|
}
|
|
|
|
// ZeCommandListUpdateMutableCommandKernelsExp Updates the kernel for a mutable command in a mutable command list.
|
|
///
|
|
/// @details
|
|
/// - This function may only be called for a mutable command list.
|
|
/// - The kernel handle must be from the provided list for given command id.
|
|
/// - The application must synchronize mutable command list execution before
|
|
/// calling this function.
|
|
/// - The application must close a mutable command list after completing all
|
|
/// updates.
|
|
/// - This function must not be called from simultaneous threads with the
|
|
/// same command list handle.
|
|
/// - This function must be called before updating kernel arguments and
|
|
/// dispatch parameters, when kernel is mutated.
|
|
/// - 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 == hCommandList`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
/// + `nullptr == pCommandId`
|
|
/// + `nullptr == phKernels`
|
|
/// - ::ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE
|
|
/// + Invalid kernel handle provided for the mutation kernel instruction operation.
|
|
func ZeCommandListUpdateMutableCommandKernelsExp(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
numKernels uint32, // numKernels [in] the number of kernels to update
|
|
pCommandId *uint64, // pCommandId [in][range(0, numKernels)] command identifier
|
|
phKernels *ZeKernelHandle, // phKernels [in][range(0, numKernels)] handle of the kernel for a command identifier to switch to
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandKernelsExp", uintptr(hCommandList), uintptr(numKernels), uintptr(unsafe.Pointer(pCommandId)), uintptr(unsafe.Pointer(phKernels)))
|
|
}
|
|
|