// 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 core import ( "unsafe" "github.com/fumiama/gozel/internal/zecall" ) // ZE_KERNEL_SCHEDULING_HINTS_EXP_NAME Kernel Scheduling Hints Extension Name const ZE_KERNEL_SCHEDULING_HINTS_EXP_NAME = "ZE_experimental_scheduling_hints" // ZeSchedulingHintsExpVersion (ze_scheduling_hints_exp_version_t) Kernel Scheduling Hints Extension Version(s) type ZeSchedulingHintsExpVersion uintptr const ( ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 version 1.0 ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT latest known version ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 ZeSchedulingHintsExpVersion = 0x7fffffff // ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_SCHEDULING_HINTS_EXP_VERSION_* ENUMs ) // ZeSchedulingHintExpFlags (ze_scheduling_hint_exp_flags_t) Supported kernel scheduling hint flags type ZeSchedulingHintExpFlags uint32 const ( ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST ZeSchedulingHintExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST Hint that the kernel prefers oldest-first scheduling ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN ZeSchedulingHintExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN Hint that the kernel prefers round-robin scheduling ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN ZeSchedulingHintExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN Hint that the kernel prefers stall-based round-robin scheduling ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 ZeSchedulingHintExpFlags = 0x7fffffff // ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_SCHEDULING_HINT_EXP_FLAG_* ENUMs ) // ZeSchedulingHintExpProperties (ze_scheduling_hint_exp_properties_t) Device kernel scheduling hint properties queried using /// ::zeDeviceGetModuleProperties /// /// @details /// - This structure may be returned from ::zeDeviceGetModuleProperties, via /// the `pNext` member of ::ze_device_module_properties_t. type ZeSchedulingHintExpProperties 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). Schedulinghintflags ZeSchedulingHintExpFlags // Schedulinghintflags [out] Supported kernel scheduling hints. May be 0 (none) or a valid combination of ::ze_scheduling_hint_exp_flag_t. } // ZeSchedulingHintExpDesc (ze_scheduling_hint_exp_desc_t) Kernel scheduling hint descriptor /// /// @details /// - This structure may be passed to ::zeKernelSchedulingHintExp. type ZeSchedulingHintExpDesc 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 ZeSchedulingHintExpFlags // Flags [in] flags specifying kernel scheduling hints. must be 0 (default) or a valid combination of ::ze_scheduling_hint_exp_flag_t. } // ZeKernelSchedulingHintExp Provide kernel scheduling hints that may improve performance /// /// @details /// - The scheduling hints may improve performance only and are not required /// for correctness. /// - If a specified scheduling hint is unsupported it will be silently /// ignored. /// - If two conflicting scheduling hints are specified there is no defined behavior; /// the hints may be ignored or one hint may be chosen arbitrarily. /// - The application must not call this function from simultaneous threads /// with the same kernel 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 == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pHint` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < pHint->flags` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeKernelSchedulingHintExp( hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object pHint *ZeSchedulingHintExpDesc, // pHint [in] pointer to kernel scheduling hint descriptor ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSchedulingHintExp", uintptr(hKernel), uintptr(unsafe.Pointer(pHint))) }