CN116303314A - Log storage method and device for GPU, electronic equipment and storage medium - Google Patents

Log storage method and device for GPU, electronic equipment and storage medium Download PDF

Info

Publication number
CN116303314A
CN116303314A CN202211626760.4A CN202211626760A CN116303314A CN 116303314 A CN116303314 A CN 116303314A CN 202211626760 A CN202211626760 A CN 202211626760A CN 116303314 A CN116303314 A CN 116303314A
Authority
CN
China
Prior art keywords
log
gpu
target
storage space
target log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211626760.4A
Other languages
Chinese (zh)
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Moore Threads Technology Co Ltd
Original Assignee
Moore Threads Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Moore Threads Technology Co Ltd filed Critical Moore Threads Technology Co Ltd
Priority to CN202211626760.4A priority Critical patent/CN116303314A/en
Publication of CN116303314A publication Critical patent/CN116303314A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a log storage method and device for a GPU, an electronic device and a storage medium, wherein the method is applied to GPU firmware and comprises the following steps: storing a first log generated during the running of the GPU into a flash memory space on a GPU board, wherein the first log is used for recording information representing the running abnormality of the GPU; storing a second log generated during the running of the GPU into an internal storage space of the GPU chip, wherein the second log is used for recording information representing the running state of the GPU; and returning the target log according to the storage position of the target log under the condition that the access request to the target log is received. The embodiment of the disclosure can improve the efficiency of managing the power consumption of the GPU.

Description

用于GPU的日志存储方法及装置、电子设备和存储介质Log storage method and device, electronic device and storage medium for GPU

技术领域technical field

本公开涉及计算机技术领域,尤其涉及一种用于GPU的日志存储方法及装置、电子设备和存储介质。The present disclosure relates to the technical field of computers, and in particular to a log storage method and device for GPU, electronic equipment and storage media.

背景技术Background technique

图形处理器(Graphics Processing Unit,GPU)是专门在设备上做图像和图形相关运算工作的微处理器。在追求GPU高性能的同时,也要保证GPU自身运行的安全性和稳定性。当GPU处理任务过多时,往往会带来温度升高、功耗增加等问题,进而影响GPU运行的安全性和稳定性。Graphics Processing Unit (GPU) is a microprocessor dedicated to image and graphics-related calculations on devices. While pursuing the high performance of the GPU, it is also necessary to ensure the security and stability of the GPU itself. When the GPU handles too many tasks, it often brings problems such as temperature rise and power consumption increase, which in turn affects the security and stability of GPU operation.

GPU的功耗管理技术可以平衡GPU运行的性能和安全性,功耗管理技术会涉及多个方面,例如,温度控制、功耗控制、性能控制等。为了支撑这些功能,不仅需要有一套健全的调试,还需要一套有助于解决问题的日志系统,通过记录的日志信息,来对GPU进行功耗管理。The power consumption management technology of the GPU can balance the performance and security of the GPU operation. The power consumption management technology involves many aspects, such as temperature control, power consumption control, and performance control. In order to support these functions, not only a set of sound debugging is required, but also a log system that helps to solve problems is needed, and the power consumption of the GPU is managed through the recorded log information.

然而,在相关技术中,并没有适配GPU功耗管理的日志系统,在通过日志系统进行GPU功耗管理时,日志系统可能会出现各种问题,导致对GPU进行功耗管理的效率较低。However, in related technologies, there is no log system adapted to GPU power management. When the log system is used to manage GPU power consumption, various problems may occur in the log system, resulting in low efficiency of GPU power management. .

发明内容Contents of the invention

本公开提出了一种用于GPU的日志存储技术方案。The present disclosure proposes a log storage technical solution for GPU.

根据本公开的一方面,提供了一种用于GPU的日志存储方法,包括:According to an aspect of the present disclosure, a log storage method for GPU is provided, including:

将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,所述第一日志用于记录表征GPU运行异常的信息;The first log generated when the GPU is running is stored in the flash memory space on the GPU board, and the first log is used to record information that characterizes the abnormal operation of the GPU;

将GPU运行时生成的第二日志存储至GPU芯片的内部存储空间中,所述第二日志用于记录表征GPU运行状态的信息;storing the second log generated when the GPU is running in the internal storage space of the GPU chip, the second log being used to record information representing the running state of the GPU;

在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志。When an access request to the target log is received, the target log is returned according to the storage location of the target log.

在一种可能的实现方式中,所述将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,包括:In a possible implementation manner, the storing the first log generated when the GPU is running in the flash memory space on the GPU board includes:

在GPU启动阶段,在GPU固件自检操作检测到存在异常的情况下,生成用于记录启动阶段的异常信息的第一日志,并存储至GPU板卡上的闪存空间中;In the GPU start-up phase, when the GPU firmware self-test operation detects that there is an exception, generate a first log for recording the abnormal information of the start-up phase, and store it in the flash memory space on the GPU board;

在GPU运行阶段,在GPU运行存在故障的情况下,生成用于记录故障信息的第一日志,并存储至GPU板卡上的闪存空间中;In the GPU running phase, when there is a fault in the GPU running, generate the first log for recording the fault information, and store it in the flash memory space on the GPU board;

在GPU运行阶段,在存在超出预设正常范围的运行状态参数的情况下,生成用于记录超出预设正常范围的运行状态参数的第一日志,并存储至GPU板卡上的闪存空间中。In the GPU running phase, if there are running state parameters exceeding the preset normal range, a first log for recording the running state parameters exceeding the preset normal range is generated and stored in the flash memory space on the GPU board.

在一种可能的实现方式中,所述在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志,包括:In a possible implementation manner, when the access request to the target log is received, returning the target log according to the storage location of the target log includes:

在接收到对目标日志的访问请求的情况下,解析所述访问请求中的日志标识;In the case of receiving an access request to the target log, parsing the log identifier in the access request;

根据所述日志标识,确定所述目标日志的存储位置;Determine the storage location of the target log according to the log identifier;

在确定的存储位置为GPU板卡上的存储空间的情况下,从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方;When the determined storage location is the storage space on the GPU board, read the target log from the storage space on the GPU board, and return it to the log requester;

在确定的存储位置为GPU芯片的内部存储空间的情况下,从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方。If the determined storage location is the internal storage space of the GPU chip, the target log is read from the internal storage space of the GPU chip and returned to the log requester.

在一种可能的实现方式中,所述GPU板卡上的存储空间包括第一存储空间和第二存储空间,所述第二存储空间中的数据为所述第一存储空间中数据的备份。In a possible implementation manner, the storage space on the GPU board includes a first storage space and a second storage space, and the data in the second storage space is a backup of the data in the first storage space.

在一种可能的实现方式中,所述从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方,包括:In a possible implementation manner, the reading the target log from the storage space on the GPU board and returning it to the log requester includes:

读取所述第一存储空间中的第一目标日志,并对第一目标日志进行完整性校验;reading the first target log in the first storage space, and performing an integrity check on the first target log;

在第一目标日志的完整性校验通过的情况下,将读取到的第一目标日志返回给日志请求方;In the case that the integrity check of the first target log is passed, returning the read first target log to the log requester;

在第一目标日志的完整性校验失败的情况下,读取所述第二存储空间中的第二目标日志,并对第二目标日志进行完整性校验;When the integrity check of the first target log fails, read the second target log in the second storage space, and perform integrity check on the second target log;

在第二目标日志的完整性校验通过的情况下,将读取到的第二目标日志返回给日志请求方。If the integrity check of the second target log is passed, the read second target log is returned to the log requester.

在一种可能的实现方式中,从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方,包括:In a possible implementation, the target log is read from the internal storage space of the GPU chip and returned to the log requester, including:

从GPU芯片的内部存储空间中读取目标日志,并进行完整性校验;Read the target log from the internal storage space of the GPU chip and perform integrity check;

在完整性校验通过的情况下,将目标日志返回给日志请求方。If the integrity check is passed, the target log is returned to the log requester.

在一种可能的实现方式中,所述第一日志用于GPU的故障定位和/或告警分析,所述第二日志用于GPU功耗管理功能的开发调试。In a possible implementation manner, the first log is used for GPU fault location and/or alarm analysis, and the second log is used for development and debugging of a GPU power management function.

在一种可能的实现方式中,所述第一日志中的参数的细分维度包括:故障定位和/或告警分析所需参数的维度;In a possible implementation manner, the subdivision dimensions of parameters in the first log include: dimensions of parameters required for fault location and/or alarm analysis;

所述第二日志的细分维度包括:功耗管理功能调试的参数的维度。The subdivision dimension of the second log includes: a dimension of parameters for power consumption management function debugging.

根据本公开的一方面,提供了一种用于GPU的日志存储装置,包括:According to an aspect of the present disclosure, a log storage device for GPU is provided, including:

第一存储单元,用于将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,所述第一日志用于记录表征GPU运行异常的信息;The first storage unit is used to store the first log generated when the GPU is running in the flash memory space on the GPU board, and the first log is used to record information representing abnormal operation of the GPU;

第二存储单元,用于将GPU运行时生成的第二日志存储至GPU芯片的内部存储空间中,所述第二日志用于记录表征GPU运行状态的信息;The second storage unit is configured to store a second log generated when the GPU is running in the internal storage space of the GPU chip, and the second log is used to record information representing the running state of the GPU;

日志返回单元,用于在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志。The log return unit is configured to return the target log according to the storage location of the target log when an access request to the target log is received.

在一种可能的实现方式中,所述第一存储单元,用于:In a possible implementation manner, the first storage unit is configured to:

在GPU启动阶段,在GPU固件自检操作检测到存在异常的情况下,生成用于记录启动阶段的异常信息的第一日志,并存储至GPU板卡上的闪存空间中;In the GPU start-up phase, when the GPU firmware self-test operation detects that there is an exception, generate a first log for recording the abnormal information of the start-up phase, and store it in the flash memory space on the GPU board;

在GPU运行阶段,在GPU运行存在故障的情况下,生成用于记录故障信息的第一日志,并存储至GPU板卡上的闪存空间中;In the GPU running phase, when there is a fault in the GPU running, generate the first log for recording the fault information, and store it in the flash memory space on the GPU board;

在GPU运行阶段,在存在超出预设正常范围的运行状态参数的情况下,生成用于记录超出预设正常范围的运行状态参数的第一日志,并存储至GPU板卡上的闪存空间中。In the GPU running phase, if there are running state parameters exceeding the preset normal range, a first log for recording the running state parameters exceeding the preset normal range is generated and stored in the flash memory space on the GPU board.

在一种可能的实现方式中,所述日志返回单元,用于:In a possible implementation manner, the log return unit is configured to:

在接收到对目标日志的访问请求的情况下,解析所述访问请求中的日志标识;In the case of receiving an access request to the target log, parsing the log identifier in the access request;

根据所述日志标识,确定所述目标日志的存储位置;Determine the storage location of the target log according to the log identifier;

在确定的存储位置为GPU板卡上的存储空间的情况下,从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方;When the determined storage location is the storage space on the GPU board, read the target log from the storage space on the GPU board, and return it to the log requester;

在确定的存储位置为GPU芯片的内部存储空间的情况下,从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方。If the determined storage location is the internal storage space of the GPU chip, the target log is read from the internal storage space of the GPU chip and returned to the log requester.

在一种可能的实现方式中,所述GPU板卡上的存储空间包括第一存储空间和第二存储空间,所述第二存储空间中的数据为所述第一存储空间中数据的备份。In a possible implementation manner, the storage space on the GPU board includes a first storage space and a second storage space, and the data in the second storage space is a backup of the data in the first storage space.

在一种可能的实现方式中,所述日志返回单元,用于:In a possible implementation manner, the log return unit is configured to:

读取所述第一存储空间中的第一目标日志,并对第一目标日志进行完整性校验;reading the first target log in the first storage space, and performing an integrity check on the first target log;

在第一目标日志的完整性校验通过的情况下,将读取到的第一目标日志返回给日志请求方;In the case that the integrity check of the first target log is passed, returning the read first target log to the log requester;

在第一目标日志的完整性校验失败的情况下,读取所述第二存储空间中的第二目标日志,并对第二目标日志进行完整性校验;When the integrity check of the first target log fails, read the second target log in the second storage space, and perform integrity check on the second target log;

在第二目标日志的完整性校验通过的情况下,将读取到的第二目标日志返回给日志请求方。If the integrity check of the second target log is passed, the read second target log is returned to the log requester.

在一种可能的实现方式中,所述日志返回单元,用于:In a possible implementation manner, the log return unit is configured to:

从GPU芯片的内部存储空间中读取目标日志,并进行完整性校验;Read the target log from the internal storage space of the GPU chip and perform integrity check;

在完整性校验通过的情况下,将目标日志返回给日志请求方。If the integrity check is passed, the target log is returned to the log requester.

在一种可能的实现方式中,所述第一日志用于GPU的故障定位和/或告警分析,所述第二日志用于GPU功耗管理功能的开发调试。In a possible implementation manner, the first log is used for GPU fault location and/or alarm analysis, and the second log is used for development and debugging of a GPU power management function.

在一种可能的实现方式中,所述第一日志中的参数的细分维度包括:故障定位和/或告警分析所需参数的维度;In a possible implementation manner, the subdivision dimensions of parameters in the first log include: dimensions of parameters required for fault location and/or alarm analysis;

所述第二日志的细分维度包括:功耗管理功能调试的参数的维度。The subdivision dimension of the second log includes: a dimension of parameters for power consumption management function debugging.

根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。According to an aspect of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above-mentioned method.

根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。According to one aspect of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented.

在本公开实施例中,日志存储方法应用于GPU固件,即由GPU固件来执行日志存储的操作,能够防止操作系统奔溃导致的日志信息不全的问题。GPU固件通过将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,所述第一日志用于记录表征GPU运行异常的信息,由于GPU板卡上的闪存空间在掉电后不会丢失保存的日志信息,因此便于通过第一日志中记录的异常信息进行问题的定位;此外,将GPU运行时生成的第二日志存储至GPU芯片的内部存储空间中,所述第二日志用于记录表征GPU运行状态的信息,便于GPU运行时进行功耗管理的开发调试,且功耗管理在GPU运行时进行,因此第二日志无需占用GPU板卡上的闪存空间,在掉电后丢失也不影响功耗管理的开发调试。显然,本公开实施例提供的日志存储方法能够很好地适配GPU的功耗管理,提高了对GPU进行功耗管理时的效率。In the embodiment of the present disclosure, the log storage method is applied to the GPU firmware, that is, the GPU firmware performs the log storage operation, which can prevent the problem of incomplete log information caused by the crash of the operating system. The GPU firmware stores the first log generated when the GPU is running in the flash memory space on the GPU board, and the first log is used to record information that characterizes the abnormal operation of the GPU. The saved log information will not be lost, so it is convenient to locate the problem through the abnormal information recorded in the first log; in addition, the second log generated when the GPU is running is stored in the internal storage space of the GPU chip, and the second log It is used to record the information representing the running state of the GPU, which is convenient for the development and debugging of power consumption management when the GPU is running, and the power consumption management is carried out when the GPU is running, so the second log does not need to occupy the flash memory space on the GPU board. The loss does not affect the development and debugging of power management. Apparently, the log storage method provided by the embodiments of the present disclosure can well adapt to the power consumption management of the GPU, and improves the efficiency of power consumption management of the GPU.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.

图1示出根据本公开实施例的用于GPU的日志存储方法的流程图。FIG. 1 shows a flow chart of a log storage method for a GPU according to an embodiment of the present disclosure.

图2示出根据本公开实施例的另一用于GPU的日志存储方法的流程图。FIG. 2 shows a flow chart of another log storage method for a GPU according to an embodiment of the present disclosure.

图3示出根据本公开实施例提供的日志访问过程的流程图。Fig. 3 shows a flowchart of a log access process provided according to an embodiment of the present disclosure.

图4示出根据本公开实施例的用于执行日志存储方法的系统的整体框架图。Fig. 4 shows an overall framework diagram of a system for executing a log storage method according to an embodiment of the present disclosure.

图5示出根据本公开实施例的用于GPU的日志存储装置的框图。FIG. 5 shows a block diagram of a log storage device for a GPU according to an embodiment of the present disclosure.

图6示出根据本公开实施例的一种电子设备的框图。Fig. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure.

图7示出根据本公开实施例的一种电子设备的框图。Fig. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.

具体实施方式Detailed ways

以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While various aspects of the embodiments are shown in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.

在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.

本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.

另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific implementation manners. It will be understood by those skilled in the art that the present disclosure may be practiced without some of the specific details. In some instances, methods, means, components and circuits that are well known to those skilled in the art have not been described in detail so as to obscure the gist of the present disclosure.

如背景技术所述,在通过日志系统进行GPU功耗管理时,日志系统可能会出现各种问题,导致对GPU进行功耗管理的效率较低。As described in the background, when the log system is used to manage GPU power consumption, various problems may occur in the log system, resulting in low efficiency of GPU power management.

例如,在相关技术中,会将日志信息记录在易失性的存储介质中,在掉电后,将无法查看保存的日志信息,导致不能定位GPU的功耗问题。这里的易失性的存储介质,例如可以是双倍速率同步动态随机存储器(Double Data Rate,DDR)、静态随机存取存储器(Static Random-Access Memory,SRAM)等。For example, in related technologies, the log information is recorded in a volatile storage medium, and the stored log information cannot be viewed after power failure, resulting in failure to locate the power consumption problem of the GPU. The volatile storage medium here may be, for example, a double-rate synchronous dynamic random-access memory (Double Data Rate, DDR), a static random-access memory (Static Random-Access Memory, SRAM), and the like.

又如,在相关技术中,通过终端的操作系统将日志信息记录在硬盘中,如果操作系统崩溃,日志信息可能会不全,更换硬盘或硬盘损坏后,造成日志缺失,导致无法定位GPU的功耗问题。As another example, in the related technology, the log information is recorded in the hard disk through the operating system of the terminal. If the operating system crashes, the log information may be incomplete. After the hard disk is replaced or the hard disk is damaged, the log will be missing, resulting in the inability to locate the power consumption of the GPU. question.

在本公开实施例中,日志存储方法应用于GPU固件,即由GPU固件来执行日志存储的操作,能够防止操作系统奔溃导致的日志信息不全的问题。GPU固件通过将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,所述第一日志用于记录表征GPU运行异常的信息,由于GPU板卡上的闪存空间在掉电后不会丢失保存的日志信息,因此便于通过第一日志中记录的异常信息进行问题的定位;此外,将GPU运行时生成的第二日志存储至GPU芯片的内部存储空间中,所述第二日志用于记录表征GPU运行状态的信息,便于GPU运行时进行功耗管理的开发调试,且功耗管理在GPU运行时进行,因此第二日志无需占用GPU板卡上的闪存空间,在掉电后丢失也不影响功耗管理的开发调试。显然,本公开实施例提供的用于GPU的日志存储方法能够很好地适配GPU的功耗管理,提高了对GPU进行功耗管理时的效率。In the embodiment of the present disclosure, the log storage method is applied to the GPU firmware, that is, the GPU firmware performs the log storage operation, which can prevent the problem of incomplete log information caused by the crash of the operating system. The GPU firmware stores the first log generated when the GPU is running in the flash memory space on the GPU board, and the first log is used to record information that characterizes the abnormal operation of the GPU. The saved log information will not be lost, so it is convenient to locate the problem through the abnormal information recorded in the first log; in addition, the second log generated when the GPU is running is stored in the internal storage space of the GPU chip, and the second log It is used to record the information representing the running state of the GPU, which is convenient for the development and debugging of power consumption management when the GPU is running, and the power consumption management is carried out when the GPU is running, so the second log does not need to occupy the flash memory space on the GPU board. The loss does not affect the development and debugging of power management. Apparently, the log storage method for the GPU provided by the embodiments of the present disclosure can be well adapted to the power consumption management of the GPU, and improves the efficiency of the power consumption management of the GPU.

本公开实施例提供的用于GPU的日志存储方法应用于GPU固件,GPU固件位于GPU硬件设备内部,独立于终端设备的操作系统之外,因此,即便终端设备的操作系统崩溃,GPU固件对日志信息的记录也不受其影响。The log storage method for the GPU provided by the embodiments of the present disclosure is applied to the GPU firmware. The GPU firmware is located inside the GPU hardware device and is independent of the operating system of the terminal device. Therefore, even if the operating system of the terminal device crashes, the GPU firmware will not update the log The recording of information is also not affected by it.

在一种可能的实现方式中,所述用于GPU的日志存储方法可以由终端设备或服务器等电子设备执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行所述方法。In a possible implementation manner, the log storage method for the GPU may be performed by an electronic device such as a terminal device or a server, and the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc., the method can be implemented by calling the computer-readable instructions stored in the memory by the processor accomplish. Alternatively, the method may be performed by a server.

图1示出根据本公开实施例的用于GPU的日志存储方法的流程图,该方法应用于GPU固件,如图1所示,所述日志存储方法包括:Fig. 1 shows a flow chart of a log storage method for GPU according to an embodiment of the present disclosure, the method is applied to GPU firmware, as shown in Fig. 1 , the log storage method includes:

在步骤S11中,将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,所述第一日志用于记录表征GPU运行异常的信息;In step S11, the first log generated when the GPU is running is stored in the flash memory space on the GPU board, and the first log is used to record information representing an abnormal operation of the GPU;

第一日志记录了表征GPU运行异常的信息,这里的GPU运行异常的信息可以是超出稳定运行范围的数值参数和故障代码等,例如,GPU的故障信息和/告警信息。其中,GPU的故障信息,例如可以是风扇故障、电源故障等;GPU的告警信息,例如可以是GPU的电压、电流、功耗、温度、频率等项目的异常告警。The first log records information indicating abnormal operation of the GPU, where the information about abnormal operation of the GPU may be numerical parameters and fault codes beyond a stable operation range, for example, fault information and/alarm information of the GPU. Wherein, the failure information of the GPU may be, for example, fan failure, power supply failure, etc.; the alarm information of the GPU may be, for example, abnormal alarms of items such as voltage, current, power consumption, temperature, and frequency of the GPU.

在一种可能的实现方式中,第一日志包括以下至少一种:风扇的故障次数、故障原因;电压超压、电压欠压、电压不稳定;电流超流、电流欠流、电流不稳定;功耗超过最大阈值、超过最大阈值的次数;温度过高产生警告的次数、温度过高关机的次数;GPU超频的次数。In a possible implementation manner, the first log includes at least one of the following: fan failure times and failure reasons; voltage overvoltage, voltage undervoltage, and voltage instability; current overcurrent, current undercurrent, and current instability; The number of times the power consumption exceeds the maximum threshold and exceeds the maximum threshold; the number of times the temperature is too high to generate a warning, the number of times the temperature is too high to shut down; the number of times the GPU is overclocked.

由于第一日志中记录了表征GPU运行异常的信息,因此,第一日志可以用于GPU的故障定位和/或告警分析。由于故障和告警在产生后,可能无法及时地被发现并处理掉,因此,往往存在GPU掉电后需要定位GPU故障原因和告警分析的情况,那么,基于第一日志的这一特殊应用场景的需求,可以将第一日志存储至GPU板卡上的闪存空间中。Since the first log records information indicative of an abnormal operation of the GPU, the first log may be used for fault location and/or alarm analysis of the GPU. Since faults and alarms may not be discovered and dealt with in a timely manner after they are generated, it is often necessary to locate the cause of the GPU fault and analyze the alarm after the GPU is powered off. Then, based on the special application scenario of the first log If required, the first log may be stored in the flash memory space on the GPU board.

GPU板卡上的闪存(FLASH)空间,为掉电后存储数据不会丢失的存储空间。即便在GPU板卡掉电后,闪存空间中存储的数据仍然可以保存,那么在GPU掉电后仍然能够读取GPU板卡上的闪存空间中的第一日志,来定位GPU的故障原因和告警分析。The flash memory (FLASH) space on the GPU board is a storage space that will not lose data after power failure. Even after the GPU board is powered off, the data stored in the flash memory space can still be saved, so after the GPU is powered off, the first log in the flash memory space on the GPU board can still be read to locate the cause of the GPU failure and the alarm analyze.

此外,由于闪存空间位于GPU板卡上,避免了更换硬盘或硬盘损坏后,日志信息缺失的情况,便于定位GPU故障原因和功耗问题。In addition, because the flash memory space is located on the GPU board, it avoids the loss of log information after the hard disk is replaced or damaged, and it is easy to locate the cause of GPU failure and power consumption.

在步骤S12中,将GPU运行时生成的第二日志存储至GPU芯片的内部存储空间中,所述第二日志用于记录表征GPU运行状态的信息;In step S12, the second log generated during GPU operation is stored in the internal storage space of the GPU chip, and the second log is used to record information representing the operating state of the GPU;

第二日志记录了表征GPU运行状态的信息,第二日志即可以记录GPU运行正常时的信息,也可以记录GPU运行异常时的信息,例如,GPU在运行时的风扇转速、电压、电流、功耗、温度、频率等项目的信息,也可以是比例积分微分控制系统(Proportional IntegralDerivative,PID)的自动控制参数信息和运行信息等。The second log records the information representing the running state of the GPU. The second log can record the information when the GPU is running normally, and can also record the information when the GPU is running abnormally. For example, the fan speed, voltage, current, power Information on items such as power consumption, temperature, frequency, etc. can also be the automatic control parameter information and operation information of the proportional integral differential control system (Proportional Integral Derivative, PID).

在一种可能的实现方式中,第二日志包括以下至少一种:风扇转速信息;各模块电压值、历史电压变化信息、变电压原因;各模块电流值、板卡总电流、历史最小电流、历史最大电流;各模块功耗、板卡总功耗、历史最小功耗、历史最大功耗;各温度传感器温度值、历史最高温度、平均温度;各模块的实时频率值、历史频率变化信息、变频的原因;PID自动控制参数信息、运行信息。In a possible implementation manner, the second log includes at least one of the following: fan speed information; voltage value of each module, historical voltage change information, cause of voltage change; current value of each module, total current of the board, historical minimum current, Historical maximum current; power consumption of each module, total board power consumption, historical minimum power consumption, historical maximum power consumption; temperature value of each temperature sensor, historical maximum temperature, average temperature; real-time frequency value of each module, historical frequency change information, Reasons for frequency conversion; PID automatic control parameter information and operation information.

由于第二日志中记录了表征GPU运行状态的信息,因此,第二日志可以用于GPU功耗管理功能的开发调试,在GPU功耗管理的开发调试过程中,会分析GPU的功耗、温度、时钟、风扇转速随时间的变化趋势和相关性,来确定PID自动控制系统在进行功耗管理时的参数,以实现降低GPU运行时的功耗、温度控制等功耗管理功能。Since the second log records the information representing the running state of the GPU, the second log can be used for the development and debugging of the GPU power management function. During the development and debugging of the GPU power management, the power consumption and temperature of the GPU will be analyzed. , Clock, and fan speed change trends and correlations with time to determine the parameters of the PID automatic control system for power management, so as to achieve power consumption management functions such as reducing GPU power consumption and temperature control during operation.

GPU功耗管理的开发调试可以在GPU运行时执行,因此,基于第二日志的这一特殊应用场景的需求,第二日志可以存储至GPU芯片的内部存储空间中,即便GPU芯片内部的存储空间在掉电后第二日志丢失,也不影响GPU功耗管理的开发调试。此外,由于第二日志可以记录GPU运行正常时的信息,也可以记录GPU运行异常时的信息,显然,第二日志的占用的存储空间可能比第一日志占用的存储空间要大,那么,将第二日志存储至GPU芯片的内部存储空间中,在内部存储空间掉电后,第二日志丢失,不用一直占用存储空间,节省了对存储空间的占用。The development and debugging of GPU power management can be performed while the GPU is running. Therefore, based on the requirements of this special application scenario of the second log, the second log can be stored in the internal storage space of the GPU chip, even if the internal storage space of the GPU chip The second log is lost after power failure, which does not affect the development and debugging of GPU power management. In addition, since the second log can record the information when the GPU is running normally, it can also record the information when the GPU is running abnormally. Obviously, the storage space occupied by the second log may be larger than the storage space occupied by the first log. Then, the The second log is stored in the internal storage space of the GPU chip. After the internal storage space is powered off, the second log is lost, and the storage space does not need to be occupied all the time, which saves the storage space.

在步骤S13中,在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志。In step S13, when an access request to the target log is received, the target log is returned according to the storage location of the target log.

在将第一日志和第二日志分别存储到不同的存储空间中后,在GPU外部应用请求访问目标日志的情况下,即可根据目标日志的存储位置,返回目标日志。该过程具体可参见本公开提供的可能的实现方式,此处不做赘述。After the first log and the second log are respectively stored in different storage spaces, when an application outside the GPU requests to access the target log, the target log can be returned according to the storage location of the target log. For details of this process, reference may be made to the possible implementation manners provided in the present disclosure, and details are not described here.

在一种可能的实现方式中,所述将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,包括:在GPU启动阶段,在GPU固件自检操作检测到存在异常的情况下,生成用于记录启动阶段的异常信息的第一日志,并存储至GPU板卡上的闪存空间中;在GPU运行阶段,在GPU运行存在故障的情况下,生成用于记录故障信息的第一日志,并存储至GPU板卡上的闪存空间中;在GPU运行阶段,在存在超出预设正常范围的运行状态参数的情况下,生成用于记录超出预设正常范围的运行状态参数的第一日志,并存储至GPU板卡上的闪存空间中。In a possible implementation manner, the storing the first log generated when the GPU is running in the flash memory space on the GPU board includes: during the GPU startup phase, when the GPU firmware self-test operation detects that there is an abnormality Next, generate the first log for recording the abnormal information in the startup phase and store it in the flash memory space on the GPU board; in the GPU running phase, if there is a fault in the GPU operation, generate the first log for recording the fault information A log, and stored in the flash memory space on the GPU board; in the GPU running phase, in the case of running state parameters exceeding the preset normal range, generate the first log for recording the running state parameters exceeding the preset normal range A log is stored in the flash memory space on the GPU board.

请参阅图2,图2示出根据本公开实施例的另一用于GPU的日志存储方法的流程图。如图2所示,在GPU启动阶段,会执行固件自检操作,判断是否存在异常情况,如是否存在供电不足、风扇故障、开机温度异常等情况,在存在异常情况时,生成用于记录启动阶段的异常信息的第一日志,并存储至GPU板卡上的闪存空间中。Please refer to FIG. 2 . FIG. 2 shows a flowchart of another log storage method for a GPU according to an embodiment of the present disclosure. As shown in Figure 2, during the startup phase of the GPU, the firmware self-check operation will be performed to determine whether there is any abnormality, such as insufficient power supply, fan failure, abnormal boot temperature, etc. The first log of the abnormal information of the stage is stored in the flash memory space on the GPU board.

在GPU运行阶段,GPU运行时,固件可以将第二日志存储至GPU芯片的内部存储空间中。In the running phase of the GPU, when the GPU is running, the firmware may store the second log in the internal storage space of the GPU chip.

在GPU运行阶段,GPU运行时,固件可以在GPU运行存在故障的情况下,生成用于记录故障信息的第一日志,并存储至GPU板卡上的闪存空间中;具体可以是将故障代码作为第一日志存储在GPU板卡上的闪存空间中。In the GPU running stage, when the GPU is running, the firmware can generate the first log for recording the fault information when the GPU runs faulty, and store it in the flash memory space on the GPU board; specifically, the fault code can be used as The first log is stored in the flash memory space on the GPU board.

此外,在存在超出预设正常范围的运行状态参数的情况下,可以生成用于记录超出预设正常范围的运行状态参数的第一日志,并存储至GPU板卡上的闪存空间中。这里的预设正常范围,为预先设定的运行状态参数的正常范围,针对风扇转速、电压、电流、功耗、温度、频率等项目,均可以预先设定一个正常范围,当实时采集到的运行状态参数超出该正常范围时,生成用于记录超出预设正常范围的运行状态参数的第一日志,将超出正常范围的运行状态参数记录下来。In addition, in the case that there are operating state parameters exceeding the preset normal range, a first log for recording the operating state parameters exceeding the preset normal range may be generated and stored in the flash memory space on the GPU board. The preset normal range here is the normal range of the pre-set operating state parameters. For fan speed, voltage, current, power consumption, temperature, frequency and other items, a normal range can be preset. When the real-time collected When the operating state parameter exceeds the normal range, a first log for recording the operating state parameter exceeding the preset normal range is generated, and the operating state parameter exceeding the normal range is recorded.

在本公开实施例中,在GPU启动阶段,在GPU固件自检操作检测到存在异常的情况下,生成用于记录启动阶段的异常信息的第一日志,并存储至GPU板卡上的闪存空间中,这样GPU板卡上的闪存空间在掉电后不会丢失保存的日志信息,便于通过第一日志中记录的异常信息对GPU启动阶段的问题进行定位;在GPU运行阶段,在GPU运行存在故障的情况下,生成用于记录故障信息的第一日志,并存储至GPU板卡上的闪存空间中,这样GPU板卡上的闪存空间在掉电后不会丢失保存的日志信息,便于通过第一日志中记录的故障信息对GPU运行阶段的问题进行定位;在GPU运行阶段,在存在超出预设正常范围的运行状态参数的情况下,生成用于记录超出预设正常范围的运行状态参数的第一日志,并存储至GPU板卡上的闪存空间中,这样GPU板卡上的闪存空间在掉电后不会丢失保存的超出预设正常范围的运行状态参数,便于通过超出预设正常范围的运行状态参数对GPU运行阶段的问题进行定位。In the embodiment of the present disclosure, in the GPU start-up phase, when the GPU firmware self-test operation detects that there is an abnormality, a first log for recording the abnormal information in the start-up phase is generated and stored in the flash memory space on the GPU board In this way, the flash memory space on the GPU board will not lose the saved log information after power failure, which is convenient for locating problems in the GPU startup phase through the abnormal information recorded in the first log; In the event of a fault, generate the first log for recording fault information and store it in the flash memory space on the GPU board, so that the saved log information will not be lost after the flash memory space on the GPU board is powered off. The fault information recorded in the first log locates the problem in the GPU running phase; in the GPU running phase, in the case of running state parameters exceeding the preset normal range, generate a running state parameter for recording exceeding the preset normal range and store it in the flash memory space on the GPU board, so that the flash memory space on the GPU board will not lose the saved operating state parameters beyond the preset normal range after power failure, so that it is convenient to pass the preset normal The running state parameters of the scope locate problems in the GPU running phase.

在一种可能的实现方式中,所述在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志,包括:在接收到对目标日志的访问请求的情况下,解析所述访问请求中的日志标识;根据所述日志标识,确定所述目标日志的存储位置;在确定的存储位置为GPU板卡上的存储空间的情况下,从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方;在确定的存储位置为GPU芯片的内部存储空间的情况下,从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方。In a possible implementation, the returning the target log according to the storage location of the target log in the case of receiving the access request to the target log includes: in the case of receiving the access request to the target log, Analyzing the log identifier in the access request; determining the storage location of the target log according to the log identifier; in the case that the determined storage location is the storage space on the GPU board, from the storage space on the GPU board Read the target log in and return it to the log requester; if the determined storage location is the internal storage space of the GPU chip, read the target log from the internal storage space of the GPU chip and return it to the log requester.

日志请求方在请求访问存储的日志时,会将要请求访问的目标日志的日志标识添加到访问请求中,然后将该访问请求发送至GPU固件,以请求获取目标日志。对于不同类目的日志,可以通过日志标识来进行区分,例如,对于第二日志,可以设置风扇转速日志的日志标识为01,温度日志的日志标识为02,电压日志的日志标识为03,电流日志的日志标识为04,等等;对于第一日志,可以设置异常风扇转速日志的日志标识为11,异常温度日志的日志标识为12,异常电压日志的日志标识为13,异常电流日志的日志标识为14,等等。When the log requester requests to access the stored logs, it will add the log identifier of the target log to be accessed to the access request, and then send the access request to the GPU firmware to request to obtain the target log. Logs of different categories can be distinguished by log identifiers. For example, for the second log, the log identifier of the fan speed log can be set to 01, the log identifier of the temperature log to 02, the log identifier of the voltage log to 03, the log identifier of the current log The log ID of the log is 04, etc.; for the first log, you can set the log ID of the abnormal fan speed log to 11, the log ID of the abnormal temperature log to 12, the log ID of the abnormal voltage log to 13, and the log ID of the abnormal current log ID is 14, etc.

图3示出根据本公开实施例提供的日志访问过程的流程图。如图3所示,GPU固件在接收到对目标日志的访问请求的情况下,即可以解析访问请求中的日志标识,由于日志标识用于表征不同类目的日志,那么根据所述日志标识,即可确定目标日志的存储位置。例如,当解析出的日志标识为02时,即可确定日志请求方是要获取温度日志,而温度日志属于第二日志,存储于GPU芯片的内部存储空间中;当解析出的日志标识为12时,即可确定日志请求方是要获取异常温度日志,而异常温度日志属于第一日志,存储于GPU板卡上的闪存空间中。Fig. 3 shows a flowchart of a log access process provided according to an embodiment of the present disclosure. As shown in Figure 3, when the GPU firmware receives an access request to the target log, it can parse the log identifier in the access request. Since the log identifier is used to represent different types of logs, according to the log identifier, The storage location of the target log can be determined. For example, when the parsed log ID is 02, it can be determined that the log requester wants to obtain the temperature log, and the temperature log belongs to the second log and is stored in the internal storage space of the GPU chip; when the parsed log ID is 12 , it can be determined that the log requester wants to obtain the abnormal temperature log, and the abnormal temperature log belongs to the first log and is stored in the flash memory space on the GPU board.

然后,在确定的存储位置为GPU板卡上的存储空间的情况下,即可从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方;在确定的存储位置为GPU芯片的内部存储空间的情况下,即可从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方。Then, when the determined storage location is the storage space on the GPU board, the target log can be read from the storage space on the GPU board and returned to the log requester; if the determined storage location is the GPU chip In the case of the internal storage space of the GPU chip, the target log can be read from the internal storage space of the GPU chip and returned to the log requester.

在本公开实施例中,由于在存储日志时,将第一日志和第二日志分别存储到了不同的存储空间中,因此,在接收到对目标日志的访问请求的情况下,会通过解析访问请求中的日志标识,然后根据日志标识,确定目标日志的存储位置,再从存储位置中读取目标日志,并返回给日志请求方。由此,能够准确地定位目标日志的存储位置并返回给日志请求方。In the embodiment of the present disclosure, since the first log and the second log are stored in different storage spaces when storing the logs, when an access request to the target log is received, the access request will be parsed The log ID in the log ID, and then determine the storage location of the target log according to the log ID, read the target log from the storage location, and return it to the log requester. Thus, the storage location of the target log can be accurately located and returned to the log requester.

在一种可能的实现方式中,所述GPU板卡上的存储空间包括第一存储空间和第二存储空间,所述第二存储空间中的数据为所述第一存储空间中数据的备份。In a possible implementation manner, the storage space on the GPU board includes a first storage space and a second storage space, and the data in the second storage space is a backup of the data in the first storage space.

在一种可能的实现方式中,所述从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方,包括:读取所述第一存储空间中的第一目标日志,并对第一目标日志进行完整性校验;在第一目标日志的完整性校验通过的情况下,将读取到的第一目标日志返回给日志请求方;在第一目标日志的完整性校验失败的情况下,读取所述第二存储空间中的第二目标日志,并对第二目标日志进行完整性校验;在第二目标日志的完整性校验通过的情况下,将读取到的第二目标日志返回给日志请求方。In a possible implementation manner, reading the target log from the storage space on the GPU board and returning it to the log requester includes: reading the first target log in the first storage space, and Perform an integrity check on the first target log; if the integrity check of the first target log passes, return the read first target log to the log requester; If the verification fails, read the second target log in the second storage space, and perform integrity check on the second target log; if the integrity check of the second target log passes, read the The obtained second target log is returned to the log requesting party.

在该实现方式中,将GPU板卡上的存储空间划分为两份,这两份存储空间的大小可以是相同的,其中一份存储空间作为另一份存储空间的备份,在其中一份存储空间中的某数据丢失后,可以读取另一份存储空间中的备份数据,以提高数据的安全性。为便于描述,这里将划分得到的两份存储空间描述为第一存储空间和第二存储空间,其中,第二存储空间为第一存储空间的备份空间。In this implementation, the storage space on the GPU board is divided into two parts, the size of the two parts of the storage space can be the same, one part of the storage space is used as the backup of the other part of the After a certain data in the space is lost, you can read the backup data in another storage space to improve data security. For ease of description, the two divided storage spaces are described here as a first storage space and a second storage space, wherein the second storage space is a backup space of the first storage space.

如图3所示,在从GPU板卡上的存储空间中读取目标日志时,可以先读取第一存储空间中的第一目标日志,并对第一目标日志进行完整性校验。完整性校验用于校验数据是否完整,即数据是否缺失。在一个示例中,完整性校验的方法可以基于消息摘要算法第五版(Message Digest Algorithm5,MD5)来进行完整性校验,在将第一目标日志存储到GPU板卡上的存储空间时,会计算第一目标日志的MD5值并保存,在读取第一目标日志时,可以再次计算第一目标日志的MD5值,并比对两个MD5值是否相同,在MD5值相同的情况下,即可确定第一目标日志的数据是完整的。As shown in FIG. 3 , when reading the target log from the storage space on the GPU board, the first target log in the first storage space may be read first, and an integrity check is performed on the first target log. Integrity check is used to check whether the data is complete, that is, whether the data is missing. In an example, the method for the integrity check can be based on the fifth edition of the message digest algorithm (Message Digest Algorithm5, MD5) to perform the integrity check, when the first target log is stored in the storage space on the GPU board, The MD5 value of the first target log will be calculated and saved. When the first target log is read, the MD5 value of the first target log can be calculated again, and the two MD5 values can be compared. If the MD5 values are the same, That is, it can be determined that the data of the first target log is complete.

在第一目标日志的完整性校验通过的情况下,表明第一目标日志是完整的未缺失的,此时即可将读取到的第一目标日志返回给日志请求方;在第一目标日志的完整性校验失败的情况下,表明第一目标日志已经缺失,此时,可以读取备份的目标日志,即读取第二存储空间中的第二目标日志。In the case that the integrity check of the first target log is passed, it indicates that the first target log is complete and not missing, and at this time, the read first target log can be returned to the log requester; If the integrity verification of the log fails, it indicates that the first target log is missing. At this time, the backup target log can be read, that is, the second target log in the second storage space can be read.

需要说明的是,这里的第二目标日志为第一目标日志的备份数据,在两个目标日志均完整未缺失的情况下,第一目标日志和第二目标日志可以是完全相同的两份日志。考虑到第二目标日志也可能会存在数据缺失的情况,因此,在读取第二存储空间中的第二目标日志后,也可以对第二目标日志进行完整性校验。对第二目标日志进行完整性校验的过程可以与对第一目标日志进行完整性校验的过程相同,此处不做赘述。It should be noted that the second target log here is the backup data of the first target log. If the two target logs are complete and not missing, the first target log and the second target log can be two identical logs . Considering that data may be missing in the second target log, after reading the second target log in the second storage space, an integrity check may also be performed on the second target log. The process of performing the integrity check on the second target log may be the same as the process of performing the integrity check on the first target log, which will not be repeated here.

在第二目标日志的完整性校验通过的情况下,表明第二目标日志是完整的未缺失的,此时即可将读取到的第二目标日志返回给日志请求方;在第二目标日志的完整性校验也失败的情况下,则向请求方返回未获取到目标日志的相关提示,例如,向请求方返回“日志数据缺失,获取失败”的提示信息。In the case that the integrity check of the second target log is passed, it indicates that the second target log is complete and not missing, and at this time, the read second target log can be returned to the log requester; If the integrity verification of the log also fails, a relevant prompt that the target log is not obtained is returned to the requester, for example, a prompt message "log data is missing, acquisition failed" is returned to the requester.

在本公开实施例中,通过将GPU板卡的存储空间划分为两份,其中一份作为备份,然后在第一存储空间中的第一目标日志有缺失的情况下,可以读取第二存储空间中备份的第二目标日志,由此,能够提高存储的日志的安全性,增加信息冗余。并且,通过对第一目标日志和第二目标日志进行完整性校验,可以保证向请求方发送的日志不会存在数据缺失的问题,保证了数据的准确性,In the embodiment of the present disclosure, by dividing the storage space of the GPU board into two parts, one of which is used as a backup, and then when the first target log in the first storage space is missing, the second storage space can be read The second target log backed up in the space can improve the security of the stored log and increase information redundancy. Moreover, by performing integrity verification on the first target log and the second target log, it can be ensured that the log sent to the requester will not have the problem of missing data, ensuring the accuracy of the data.

在一种可能的实现方式中,从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方,包括:从GPU芯片的内部存储空间中读取目标日志,并进行完整性校验;在完整性校验通过的情况下,将目标日志返回给日志请求方。In a possible implementation, the target log is read from the internal storage space of the GPU chip and returned to the log requesting party, including: reading the target log from the internal storage space of the GPU chip and performing an integrity check ; If the integrity check is passed, return the target log to the log requester.

对内部存储空间中的目标日志进行完整性校验的过程,可以与对第一目标日志进行完整性校验的过程相同,此处不做赘述。The process of performing the integrity check on the target log in the internal storage space may be the same as the process of performing the integrity check on the first target log, which will not be repeated here.

在本公开实施例中,在从GPU芯片的内部存储空间中读取目标日志时,通过对目标日志进行完整性校验,在完整性校验通过的情况下,将目标日志返回给日志请求方,由此,可以保证向请求方发送的日志不会存在数据缺失的问题,保证了数据的准确性。In the embodiment of the present disclosure, when the target log is read from the internal storage space of the GPU chip, the integrity check is performed on the target log, and when the integrity check passes, the target log is returned to the log requester , thus, it can be guaranteed that the log sent to the requester will not have the problem of missing data, and the accuracy of the data is guaranteed.

在一种可能的实现方式中,所述第一日志中的参数的细分维度包括:故障定位和/或告警分析所需参数的维度;所述第二日志的细分维度包括:功耗管理功能调试的参数的维度。In a possible implementation manner, the subdivision dimension of parameters in the first log includes: the dimension of parameters required for fault location and/or alarm analysis; the subdivision dimension of the second log includes: power consumption management Dimensions of parameters for function debugging.

由于第一日志可以用于GPU的故障定位和/或告警分析,为方便基于第一日志进行故障定位,对第一日志中的参数的细分维度可以按照故障定位所需参数的维度进行划分;为方便基于第一日志进行告警分析,对第一日志中的参数的细分维度可以按照告警分析所需参数的维度进行划分。Since the first log can be used for fault location and/or alarm analysis of the GPU, in order to facilitate fault location based on the first log, the subdivision dimensions of the parameters in the first log can be divided according to the dimensions of the parameters required for fault location; To facilitate alarm analysis based on the first log, the subdivision dimensions of parameters in the first log may be divided according to the dimensions of parameters required for alarm analysis.

请参阅表1,为本公开实施例提供的一种第一日志中的参数的细分维度。Please refer to Table 1, which is a subdivision dimension of parameters in the first log provided by an embodiment of the present disclosure.

表1第一日志中的参数的细分维度Table 1 Segmentation dimensions of parameters in the first log

条目entry 说明illustrate 风扇fan 包括故障次数、故障原因等Including failure times, failure reasons, etc. 电压Voltage 包括超压、欠压、不稳定等Including overpressure, undervoltage, instability, etc. 电流electric current 包括超流、欠流、不稳定等Including overcurrent, undercurrent, instability, etc. 功耗power consumption 包括功耗超过最大阈值、超过警告阈值的次数等Including the number of times the power consumption exceeds the maximum threshold, the warning threshold is exceeded, etc. 温度temperature 包括温度超过警告的次数、超过关机的次数等Including the number of times the temperature exceeds the warning, the number of times the shutdown is exceeded, etc. 频率frequency 包括超频的次数等Including the number of times of overclocking, etc.

请参阅表2,为本公开实施例提供的一种第二日志中的参数的细分维度。Please refer to Table 2, which is a subdivision dimension of parameters in the second log provided by an embodiment of the present disclosure.

表2第二日志中的参数的细分维度Table 2 Dimensions of subdivision of parameters in the second log

Figure BDA0004003812840000101
Figure BDA0004003812840000101

由于第二日志可以用于GPU功耗管理功能的开发调试,为方便基于第二日志进行GPU功耗管理功能的开发调试,对第二日志中参数的细分维度可以按照功耗管理功能调试的参数的维度进行划分。Since the second log can be used for the development and debugging of the GPU power management function, in order to facilitate the development and debugging of the GPU power management function based on the second log, the subdivision dimension of the parameters in the second log can be debugged according to the power consumption management function Dimensions of parameters are divided.

在本公开实施例中,通过按照故障定位和/或告警分析所需参数的维度划分第一日志中的参数,方便进行故障定位和告警分析;通过按照功耗管理功能调试的参数的维度划分第二日志,方便进行功耗管理功能的开发调试。In the embodiment of the present disclosure, by dividing the parameters in the first log according to the dimension of parameters required for fault location and/or alarm analysis, it is convenient to perform fault location and alarm analysis; The second log is convenient for the development and debugging of power management functions.

图4示出根据本公开实施例的用于执行日志存储方法的系统的整体框架图,该系统用于执行本公开提供的用于GPU的日志存储方法。其中,GPU固件将日志分别存储到GPU板卡上的闪存空间和GPU芯片的内部存储空间中。该系统中的日志请求方包括:运行于终端操作系统中的请求方、外部工具的通用异步收发器(UART)、基板管理控制器(BMC)。其中,操作系统中的请求方通过进程间通信(Inter-Process Communication,IPC)与GPU固件进行交互,获取存储的日志;UART基于发射/接收(TX/RX)端口与GPU固件进行交互,获取存储的日志;BMC基于系统管理总线(System Management Bus,SMBUS)与GPU固件进行交互,获取存储的日志。FIG. 4 shows an overall frame diagram of a system for executing a log storage method according to an embodiment of the present disclosure, and the system is used for executing the log storage method for GPU provided by the present disclosure. Wherein, the GPU firmware stores the log in the flash memory space on the GPU board and the internal storage space of the GPU chip respectively. The log requester in the system includes: the requester running in the terminal operating system, the universal asynchronous transceiver (UART) of the external tool, and the baseboard management controller (BMC). Among them, the requester in the operating system interacts with the GPU firmware through Inter-Process Communication (IPC) to obtain stored logs; the UART interacts with the GPU firmware based on the transmit/receive (TX/RX) port to obtain stored logs. logs; the BMC interacts with the GPU firmware based on the System Management Bus (SMBUS) to obtain stored logs.

日志请求方根据读取到的日志,进行一系列的功能开发和分析,包括:The log requester conducts a series of functional development and analysis based on the read logs, including:

a)分析功耗、温度、时钟、风扇转速随时间变化趋势。a) Analyze the trend of power consumption, temperature, clock, and fan speed over time.

b)根据读取的信息,分析GPU板卡健康状态,比如超温、超功率、超频的次数、风扇是否异常等。b) According to the read information, analyze the health status of the GPU board, such as overtemperature, overpower, number of overclocking, whether the fan is abnormal, etc.

可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above-mentioned method embodiments mentioned in this disclosure can all be combined with each other to form a combined embodiment without violating the principle and logic. Due to space limitations, this disclosure will not repeat them. Those skilled in the art can understand that, in the above method in the specific implementation manner, the specific execution order of each step should be determined according to its function and possible internal logic.

此外,本公开还提供了用于GPU的日志存储装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种用于GPU的日志存储方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides log storage devices for GPUs, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any of the log storage methods for GPUs provided in the present disclosure, corresponding technical solutions and Describe and refer to the corresponding records in the method section, and will not repeat them here.

图5示出根据本公开实施例的用于GPU的日志存储装置的框图,如图5所示,所述装置20包括:FIG. 5 shows a block diagram of a log storage device for a GPU according to an embodiment of the present disclosure. As shown in FIG. 5, the device 20 includes:

第一存储单元21,用于将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,所述第一日志用于记录表征GPU运行异常的信息;The first storage unit 21 is configured to store the first log generated when the GPU is running in the flash memory space on the GPU board, and the first log is used to record information representing an abnormal operation of the GPU;

第二存储单元22,用于将GPU运行时生成的第二日志存储至GPU芯片的内部存储空间中,所述第二日志用于记录表征GPU运行状态的信息;The second storage unit 22 is configured to store a second log generated when the GPU is running in the internal storage space of the GPU chip, the second log being used to record information representing the running state of the GPU;

日志返回单元23,用于在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志。The log return unit 23 is configured to return the target log according to the storage location of the target log when an access request to the target log is received.

在一种可能的实现方式中,所述第一存储单元,用于:In a possible implementation manner, the first storage unit is configured to:

在GPU启动阶段,在GPU固件自检操作检测到存在异常的情况下,生成用于记录启动阶段的异常信息的第一日志,并存储至GPU板卡上的闪存空间中;In the GPU start-up phase, when the GPU firmware self-test operation detects that there is an exception, generate a first log for recording the abnormal information of the start-up phase, and store it in the flash memory space on the GPU board;

在GPU运行阶段,在GPU运行存在故障的情况下,生成用于记录故障信息的第一日志,并存储至GPU板卡上的闪存空间中;In the GPU running phase, when there is a fault in the GPU running, generate the first log for recording the fault information, and store it in the flash memory space on the GPU board;

在GPU运行阶段,在存在超出预设正常范围的运行状态参数的情况下,生成用于记录超出预设正常范围的运行状态参数的第一日志,并存储至GPU板卡上的闪存空间中。In the GPU running phase, if there are running state parameters exceeding the preset normal range, a first log for recording the running state parameters exceeding the preset normal range is generated and stored in the flash memory space on the GPU board.

在一种可能的实现方式中,所述日志返回单元,用于:In a possible implementation manner, the log return unit is configured to:

在接收到对目标日志的访问请求的情况下,解析所述访问请求中的日志标识;In the case of receiving an access request to the target log, parsing the log identifier in the access request;

根据所述日志标识,确定所述目标日志的存储位置;Determine the storage location of the target log according to the log identifier;

在确定的存储位置为GPU板卡上的存储空间的情况下,从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方;When the determined storage location is the storage space on the GPU board, read the target log from the storage space on the GPU board, and return it to the log requester;

在确定的存储位置为GPU芯片的内部存储空间的情况下,从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方。If the determined storage location is the internal storage space of the GPU chip, the target log is read from the internal storage space of the GPU chip and returned to the log requester.

在一种可能的实现方式中,所述GPU板卡上的存储空间包括第一存储空间和第二存储空间,所述第二存储空间中的数据为所述第一存储空间中数据的备份。In a possible implementation manner, the storage space on the GPU board includes a first storage space and a second storage space, and the data in the second storage space is a backup of the data in the first storage space.

在一种可能的实现方式中,所述日志返回单元,用于:In a possible implementation manner, the log return unit is configured to:

读取所述第一存储空间中的第一目标日志,并对第一目标日志进行完整性校验;reading the first target log in the first storage space, and performing an integrity check on the first target log;

在第一目标日志的完整性校验通过的情况下,将读取到的第一目标日志返回给日志请求方;In the case that the integrity check of the first target log is passed, returning the read first target log to the log requester;

在第一目标日志的完整性校验失败的情况下,读取所述第二存储空间中的第二目标日志,并对第二目标日志进行完整性校验;When the integrity check of the first target log fails, read the second target log in the second storage space, and perform integrity check on the second target log;

在第二目标日志的完整性校验通过的情况下,将读取到的第二目标日志返回给日志请求方。If the integrity check of the second target log is passed, the read second target log is returned to the log requester.

在一种可能的实现方式中,所述日志返回单元,用于:In a possible implementation manner, the log return unit is configured to:

从GPU芯片的内部存储空间中读取目标日志,并进行完整性校验;Read the target log from the internal storage space of the GPU chip and perform integrity check;

在完整性校验通过的情况下,将目标日志返回给日志请求方。If the integrity check is passed, the target log is returned to the log requester.

在一种可能的实现方式中,所述第一日志用于GPU的故障定位和/或告警分析,所述第二日志用于GPU功耗管理功能的开发调试。In a possible implementation manner, the first log is used for GPU fault location and/or alarm analysis, and the second log is used for development and debugging of a GPU power management function.

在一种可能的实现方式中,所述第一日志中的参数的细分维度包括:故障定位和/或告警分析所需参数的维度;In a possible implementation manner, the subdivision dimensions of parameters in the first log include: dimensions of parameters required for fault location and/or alarm analysis;

所述第二日志的细分维度包括:功耗管理功能调试的参数的维度。The subdivision dimension of the second log includes: a dimension of parameters for power consumption management function debugging.

该方法与计算机系统的内部结构存在特定技术关联,且能够解决如何提升硬件运算效率或执行效果的技术问题(包括减少数据存储量、减少数据传输量、提高硬件处理速度等),从而获得符合自然规律的计算机系统内部性能改进的技术效果。This method has a specific technical relationship with the internal structure of the computer system, and it can solve the technical problems of how to improve the hardware computing efficiency or execution effect (including reducing the amount of data storage, reducing the amount of data transmission, increasing the processing speed of the hardware, etc.), so as to obtain a natural The technical effect of regular computer system internal performance improvements.

在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.

本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor. Computer readable storage media may be volatile or nonvolatile computer readable storage media.

本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.

本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.

电子设备可以被提供为终端、服务器或其它形态的设备。Electronic devices may be provided as terminals, servers, or other forms of devices.

图6示出根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等终端设备。FIG. 6 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure. For example, the electronic device 800 may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, Terminal devices such as wearable devices.

参照图6,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)接口812,传感器组件814,以及通信组件816。Referring to FIG. 6, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and a communication component 816 .

处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .

存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to various components of the electronic device 800 . Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .

多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 . In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(CMOS)或电荷耦合装置(CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 . For example, the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(Wi-Fi)、第二代移动通信技术(2G)、第三代移动通信技术(3G)、第四代移动通信技术(4G)、通用移动通信技术的长期演进(LTE)、第五代移动通信技术(5G)或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access wireless networks based on communication standards, such as wireless networks (Wi-Fi), second-generation mobile communication technologies (2G), third-generation mobile communication technologies (3G), fourth-generation mobile communication technologies (4G ), the long-term evolution (LTE) of the universal mobile communication technology, the fifth generation mobile communication technology (5G) or their combination. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, there is also provided a non-volatile computer-readable storage medium, such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to implement the above method.

图7示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器或终端设备。参照图7,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 7 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or terminal device. Referring to FIG. 7 , electronic device 1900 includes processing component 1922 , which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922 , such as application programs. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows ServerTM),苹果公司推出的基于图形用户界面操作系统(Mac OSXTM),多用户多进程的计算机操作系统(UnixTM),自由和开放原代码的类Unix操作系统(LinuxTM),开放原代码的类Unix操作系统(FreeBSDTM)或类似。Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input-output (I/O) interface 1958 . The electronic device 1900 can operate based on the operating system stored in the memory 1932, such as the Microsoft server operating system (Windows Server TM ), the graphical user interface-based operating system (Mac OSX TM ) introduced by Apple Inc., and the multi-user and multi-process computer operating system ( Unix ), a free and open-source Unix-like operating system (Linux ), an open-source Unix-like operating system (FreeBSD ), or the like.

在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.

本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure can be a system, method and/or computer program product. A computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.

计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, such as a printer with instructions stored thereon A hole card or a raised structure in a groove, and any suitable combination of the above. As used herein, computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.

这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .

用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or Source or object code written in any combination, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages. Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as via the Internet using an Internet service provider). connect). In some embodiments, an electronic circuit, such as a programmable logic circuit, field programmable gate array (FPGA), or programmable logic array (PLA), can be customized by utilizing state information of computer-readable program instructions, which can Various aspects of the present disclosure are implemented by executing computer readable program instructions.

这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.

这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.

也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions into a computer, other programmable data processing device, or other equipment, so that a series of operational steps are performed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , so that instructions executed on computers, other programmable data processing devices, or other devices implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.

附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.

该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically realized by means of hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium. In another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. wait.

上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments, the same or similar points can be referred to each other, and for the sake of brevity, details are not repeated herein.

本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possible The inner logic is OK.

若本申请技术方案涉及个人信息,应用本申请技术方案的产品在处理个人信息前,已明确告知个人信息处理规则,并取得个人自主同意。若本申请技术方案涉及敏感个人信息,应用本申请技术方案的产品在处理敏感个人信息前,已取得个人单独同意,并且同时满足“明示同意”的要求。例如,在摄像头等个人信息采集装置处,设置明确显著的标识告知已进入个人信息采集范围,将会对个人信息进行采集,若个人自愿进入采集范围即视为同意对其个人信息进行采集;或者在个人信息处理的装置上,利用明显的标识/信息告知个人信息处理规则的情况下,通过弹窗信息或请个人自行上传其个人信息等方式获得个人授权;其中,个人信息处理规则可包括个人信息处理者、个人信息处理目的、处理方式以及处理的个人信息种类等信息。If the technical solution of this application involves personal information, the product applying the technical solution of this application has clearly notified the personal information processing rules and obtained the individual's independent consent before processing personal information. If the technical solution of this application involves sensitive personal information, the products applying the technical solution of this application have obtained individual consent before processing sensitive personal information, and at the same time meet the requirements of "express consent". For example, at a personal information collection device such as a camera, a clear and prominent sign is set up to inform that it has entered the scope of personal information collection, and personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed to agree to the collection of his personal information; or On the personal information processing device, when the personal information processing rules are informed with obvious signs/information, personal authorization is obtained through pop-up information or by asking individuals to upload their personal information; among them, the personal information processing rules may include Information such as the information processor, the purpose of personal information processing, the method of processing, and the type of personal information processed.

以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Having described various embodiments of the present disclosure above, the foregoing description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and alterations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principle of each embodiment, practical application or improvement of technology in the market, or to enable other ordinary skilled in the art to understand each embodiment disclosed herein.

Claims (11)

1.一种用于GPU的日志存储方法,其特征在于,应用于GPU固件,包括:1. A log storage method for GPU, characterized in that, being applied to GPU firmware, comprising: 将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,所述第一日志用于记录表征GPU运行异常的信息;The first log generated when the GPU is running is stored in the flash memory space on the GPU board, and the first log is used to record information that characterizes the abnormal operation of the GPU; 将GPU运行时生成的第二日志存储至GPU芯片的内部存储空间中,所述第二日志用于记录表征GPU运行状态的信息;storing the second log generated when the GPU is running in the internal storage space of the GPU chip, the second log being used to record information representing the running state of the GPU; 在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志。When an access request to the target log is received, the target log is returned according to the storage location of the target log. 2.根据权利要求1所述的方法,其特征在于,所述将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,包括:2. The method according to claim 1, wherein storing the first log generated by the GPU runtime into the flash memory space on the GPU board includes: 在GPU启动阶段,在GPU固件自检操作检测到存在异常的情况下,生成用于记录启动阶段的异常信息的第一日志,并存储至GPU板卡上的闪存空间中;In the GPU start-up phase, when the GPU firmware self-test operation detects that there is an exception, generate a first log for recording the abnormal information of the start-up phase, and store it in the flash memory space on the GPU board; 在GPU运行阶段,在GPU运行存在故障的情况下,生成用于记录故障信息的第一日志,并存储至GPU板卡上的闪存空间中;In the GPU running phase, when there is a fault in the GPU running, generate the first log for recording the fault information, and store it in the flash memory space on the GPU board; 在GPU运行阶段,在存在超出预设正常范围的运行状态参数的情况下,生成用于记录超出预设正常范围的运行状态参数的第一日志,并存储至GPU板卡上的闪存空间中。In the GPU running phase, if there are running state parameters exceeding the preset normal range, a first log for recording the running state parameters exceeding the preset normal range is generated and stored in the flash memory space on the GPU board. 3.根据权利要求1所述的方法,其特征在于,所述在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志,包括:3. The method according to claim 1, wherein when the access request to the target log is received, returning the target log according to the storage location of the target log includes: 在接收到对目标日志的访问请求的情况下,解析所述访问请求中的日志标识;In the case of receiving an access request to the target log, parsing the log identifier in the access request; 根据所述日志标识,确定所述目标日志的存储位置;Determine the storage location of the target log according to the log identifier; 在确定的存储位置为GPU板卡上的存储空间的情况下,从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方;When the determined storage location is the storage space on the GPU board, read the target log from the storage space on the GPU board, and return it to the log requester; 在确定的存储位置为GPU芯片的内部存储空间的情况下,从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方。If the determined storage location is the internal storage space of the GPU chip, the target log is read from the internal storage space of the GPU chip and returned to the log requester. 4.根据权利要求3所述的方法,其特征在于,所述GPU板卡上的存储空间包括第一存储空间和第二存储空间,所述第二存储空间中的数据为所述第一存储空间中数据的备份。4. The method according to claim 3, wherein the storage space on the GPU board includes a first storage space and a second storage space, and the data in the second storage space is the first storage space. Backup of data in space. 5.根据权利要求4所述的方法,其特征在于,所述从GPU板卡上的存储空间中读取目标日志,并返回给日志请求方,包括:5. The method according to claim 4, wherein the reading the target log from the storage space on the GPU board and returning it to the log requester includes: 读取所述第一存储空间中的第一目标日志,并对第一目标日志进行完整性校验;reading the first target log in the first storage space, and performing an integrity check on the first target log; 在第一目标日志的完整性校验通过的情况下,将读取到的第一目标日志返回给日志请求方;In the case that the integrity check of the first target log is passed, returning the read first target log to the log requester; 在第一目标日志的完整性校验失败的情况下,读取所述第二存储空间中的第二目标日志,并对第二目标日志进行完整性校验;When the integrity check of the first target log fails, read the second target log in the second storage space, and perform integrity check on the second target log; 在第二目标日志的完整性校验通过的情况下,将读取到的第二目标日志返回给日志请求方。If the integrity check of the second target log is passed, the read second target log is returned to the log requester. 6.根据权利要求3所述的方法,其特征在于,从GPU芯片的内部存储空间中读取目标日志,并返回给日志请求方,包括:6. The method according to claim 3, wherein the target log is read from the internal storage space of the GPU chip and returned to the log requester, comprising: 从GPU芯片的内部存储空间中读取目标日志,并进行完整性校验;Read the target log from the internal storage space of the GPU chip and perform integrity check; 在完整性校验通过的情况下,将目标日志返回给日志请求方。If the integrity check is passed, the target log is returned to the log requester. 7.根据权利要求1所述的方法,其特征在于,所述第一日志用于GPU的故障定位和/或告警分析,所述第二日志用于GPU功耗管理功能的开发调试。7. The method according to claim 1, wherein the first log is used for GPU fault location and/or alarm analysis, and the second log is used for development and debugging of a GPU power management function. 8.根据权利要求7所述的方法,其特征在于,所述第一日志中的参数的细分维度包括:故障定位和/或告警分析所需参数的维度;8. The method according to claim 7, wherein the subdivision dimensions of parameters in the first log include: dimensions of parameters required for fault location and/or alarm analysis; 所述第二日志的细分维度包括:功耗管理功能调试的参数的维度。The subdivision dimension of the second log includes: a dimension of parameters for power consumption management function debugging. 9.一种用于GPU的日志存储装置,其特征在于,包括:9. A log storage device for GPU, comprising: 第一存储单元,用于将GPU运行时生成的第一日志存储至GPU板卡上的闪存空间中,所述第一日志用于记录表征GPU运行异常的信息;The first storage unit is used to store the first log generated when the GPU is running in the flash memory space on the GPU board, and the first log is used to record information representing abnormal operation of the GPU; 第二存储单元,用于将GPU运行时生成的第二日志存储至GPU芯片的内部存储空间中,所述第二日志用于记录表征GPU运行状态的信息;The second storage unit is configured to store a second log generated when the GPU is running in the internal storage space of the GPU chip, and the second log is used to record information representing the running state of the GPU; 日志返回单元,用于在接收到对目标日志的访问请求的情况下,根据目标日志的存储位置,返回目标日志。The log return unit is configured to return the target log according to the storage location of the target log when an access request to the target log is received. 10.一种电子设备,其特征在于,包括:10. An electronic device, characterized in that it comprises: 处理器;processor; 用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions; 其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至8中任意一项所述的方法。Wherein, the processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1-8. 11.一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至8中任意一项所述的方法。11. A computer-readable storage medium, on which computer program instructions are stored, wherein, when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
CN202211626760.4A 2022-12-16 2022-12-16 Log storage method and device for GPU, electronic equipment and storage medium Pending CN116303314A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211626760.4A CN116303314A (en) 2022-12-16 2022-12-16 Log storage method and device for GPU, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211626760.4A CN116303314A (en) 2022-12-16 2022-12-16 Log storage method and device for GPU, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116303314A true CN116303314A (en) 2023-06-23

Family

ID=86798452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211626760.4A Pending CN116303314A (en) 2022-12-16 2022-12-16 Log storage method and device for GPU, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116303314A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209170A (en) * 2019-10-21 2020-05-29 江苏卓易信息科技股份有限公司 Rule-based user behavior log acquisition and analysis method and system
CN112685227A (en) * 2020-12-23 2021-04-20 北京浪潮数据技术有限公司 Log management method, device and equipment and computer readable storage medium
CN114691025A (en) * 2020-12-31 2022-07-01 龙芯中科技术股份有限公司 Log recording method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209170A (en) * 2019-10-21 2020-05-29 江苏卓易信息科技股份有限公司 Rule-based user behavior log acquisition and analysis method and system
CN112685227A (en) * 2020-12-23 2021-04-20 北京浪潮数据技术有限公司 Log management method, device and equipment and computer readable storage medium
CN114691025A (en) * 2020-12-31 2022-07-01 龙芯中科技术股份有限公司 Log recording method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
游理通;王振杰;黄林鹏;: "一个基于日志结构的非易失性内存键值存储系统", 计算机研究与发展, no. 09, pages 182 - 183 *

Similar Documents

Publication Publication Date Title
CN117280327B (en) Using machine learning models to detect large-scale data center outages using near real-time/offline data
CN109783345B (en) Method and system for testing small program performance
CN108874672B (en) Application program exception positioning method, device, equipment and storage medium
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN110727473B (en) Resource control method, device, system, storage medium and electronic equipment
CN108520063B (en) Event log processing method and device and terminal equipment
CN111694677A (en) Message queue management method, device, terminal and computer-readable storage medium
CN108052407A (en) A kind of application crash means of defence, device, equipment and storage medium
JP2021163475A (en) Log-based mashup code generation
US9823905B2 (en) Event based code generation
CN110765085A (en) Log information writing method, system, storage medium and mobile terminal
CN115877938A (en) Control method, device, equipment, storage medium and program product of GPU
CN108668241A (en) Information reminding method, device, storage medium and electronic equipment
CN112000491B (en) Application program interface calling method, device, equipment and storage medium
CN116303314A (en) Log storage method and device for GPU, electronic equipment and storage medium
US20150212569A1 (en) User space based performance state switching of a processor of a data processing device
CN110716908A (en) Log information writing method, system, storage medium and mobile terminal
WO2016177219A1 (en) Method and apparatus for detecting power consumption abnormality
CN113835752B (en) Data acquisition method, device, terminal and storage medium
CN114416483A (en) Running state monitoring method and device for multi-processing unit, storage medium and equipment
CN108509223B (en) Data processing method, device and system and storage medium
CN107729180A (en) Abnormal information processing method and processing device, computer installation and readable storage medium storing program for executing
CN110837433A (en) Performance optimization method and device and electronic equipment
CN116401017B (en) Method, device, equipment and storage medium for realizing virtual display card
US20070174604A1 (en) System and method for calculating an average startup time of a computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: B655, 4th Floor, Building 14, Cuiwei Zhongli, Haidian District, Beijing, 100036

Applicant after: Mole Thread Intelligent Technology (Beijing) Co.,Ltd.

Address before: 209, 2nd Floor, No. 31 Haidian Street, Haidian District, Beijing

Applicant before: Moore Threads Technology Co., Ltd.

Country or region before: China