1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 08:20:24 +08:00
Files
gozel/sysm_rasState.go
github-actions[bot] 32abd8ea7c chore: run go generate
2026-03-26 00:49:32 +08:00

144 lines
7.2 KiB
Go

// Code generated by cmd/gen. DO NOT EDIT.
/*
*
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file zes_api.h
* @version v1.15-r1.15.31
*
*/
package gozel
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZES_RAS_GET_STATE_EXP_NAME RAS Get State Extension Name
const ZES_RAS_GET_STATE_EXP_NAME = "ZES_extension_ras_state"
// ZesRasStateExpVersion (zes_ras_state_exp_version_t) RAS Get State Extension Version(s)
type ZesRasStateExpVersion uintptr
const (
ZES_RAS_STATE_EXP_VERSION_1_0 ZesRasStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_RAS_STATE_EXP_VERSION_1_0 version 1.0
ZES_RAS_STATE_EXP_VERSION_CURRENT ZesRasStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_RAS_STATE_EXP_VERSION_CURRENT latest known version
ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 ZesRasStateExpVersion = 0x7fffffff // ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_RAS_STATE_EXP_VERSION_* ENUMs
)
// ZesRasErrorCategoryExp (zes_ras_error_category_exp_t) RAS error categories
type ZesRasErrorCategoryExp uintptr
const (
ZES_RAS_ERROR_CATEGORY_EXP_RESET ZesRasErrorCategoryExp = 0 // ZES_RAS_ERROR_CATEGORY_EXP_RESET The number of accelerator engine resets attempted by the driver
ZES_RAS_ERROR_CATEGORY_EXP_PROGRAMMING_ERRORS ZesRasErrorCategoryExp = 1 // ZES_RAS_ERROR_CATEGORY_EXP_PROGRAMMING_ERRORS The number of hardware exceptions generated by the way workloads have
///< programmed the hardware
ZES_RAS_ERROR_CATEGORY_EXP_DRIVER_ERRORS ZesRasErrorCategoryExp = 2 // ZES_RAS_ERROR_CATEGORY_EXP_DRIVER_ERRORS The number of low level driver communication errors have occurred
ZES_RAS_ERROR_CATEGORY_EXP_COMPUTE_ERRORS ZesRasErrorCategoryExp = 3 // ZES_RAS_ERROR_CATEGORY_EXP_COMPUTE_ERRORS The number of errors that have occurred in the compute accelerator
///< hardware
ZES_RAS_ERROR_CATEGORY_EXP_NON_COMPUTE_ERRORS ZesRasErrorCategoryExp = 4 // ZES_RAS_ERROR_CATEGORY_EXP_NON_COMPUTE_ERRORS The number of errors that have occurred in the fixed-function
///< accelerator hardware
ZES_RAS_ERROR_CATEGORY_EXP_CACHE_ERRORS ZesRasErrorCategoryExp = 5 // ZES_RAS_ERROR_CATEGORY_EXP_CACHE_ERRORS The number of errors that have occurred in caches (L1/L3/register
///< file/shared local memory/sampler)
ZES_RAS_ERROR_CATEGORY_EXP_DISPLAY_ERRORS ZesRasErrorCategoryExp = 6 // ZES_RAS_ERROR_CATEGORY_EXP_DISPLAY_ERRORS The number of errors that have occurred in the display
ZES_RAS_ERROR_CATEGORY_EXP_MEMORY_ERRORS ZesRasErrorCategoryExp = 7 // ZES_RAS_ERROR_CATEGORY_EXP_MEMORY_ERRORS The number of errors that have occurred in Memory
ZES_RAS_ERROR_CATEGORY_EXP_SCALE_ERRORS ZesRasErrorCategoryExp = 8 // ZES_RAS_ERROR_CATEGORY_EXP_SCALE_ERRORS The number of errors that have occurred in Scale Fabric
ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS ZesRasErrorCategoryExp = 9 // ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS The number of errors that have occurred in L3 Fabric
ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 ZesRasErrorCategoryExp = 0x7fffffff // ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 Value marking end of ZES_RAS_ERROR_CATEGORY_EXP_* ENUMs
)
// ZesRasStateExp (zes_ras_state_exp_t) Extension structure for providing RAS error counters for different
// / error sets
type ZesRasStateExp struct {
Category ZesRasErrorCategoryExp // Category [out] category for which error counter is provided.
Errorcounter uint64 // Errorcounter [out] Current value of RAS counter for specific error category.
}
// ZesRasGetStateExp Ras Get State
// /
// / @details
// / - This function retrieves error counters for different RAS error
// / categories.
// / - 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 == hRas`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pCount`
func ZesRasGetStateExp(
hRas ZesRasHandle, // hRas [in] Handle for the component.
pCount *uint32, // pCount [in,out] pointer to the number of RAS state structures that can be retrieved. if count is zero, then the driver shall update the value with the total number of error categories for which state can be retrieved. if count is greater than the number of RAS states available, then the driver shall update the value with the correct number of RAS states available.
pState *ZesRasStateExp, // pState [in,out][optional][range(0, *pCount)] array of query results for RAS error states for different categories. if count is less than the number of RAS states available, then driver shall only retrieve that number of RAS states.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesRasGetStateExp", uintptr(hRas), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pState)))
}
// ZesRasClearStateExp Ras Clear State
// /
// / @details
// / - This function clears error counters for a RAS error category.
// / - Clearing errors will affect other threads/applications - the counter
// / values will start from zero.
// / - Clearing errors requires write permissions.
// / - The application should not 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_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 == hRas`
// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
// / + `::ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS < category`
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / + Don't have permissions to clear error counters.
func ZesRasClearStateExp(
hRas ZesRasHandle, // hRas [in] Handle for the component.
category ZesRasErrorCategoryExp, // category [in] category for which error counter is to be cleared.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesRasClearStateExp", uintptr(hRas), uintptr(category))
}